Skip to content

Commit

Permalink
Changes suggested in review...
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-chaudhari1 committed Mar 23, 2021
1 parent 0dae9a5 commit 7e53117
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions fury/tests/test_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_manifest_pbr(interactive=False):
sphere = get_sphere('symmetric362')
shape = (11, 11, 11, sphere.vertices.shape[0])
fid, fname = mkstemp(suffix='_odf_slicer.mmap')
odfs = np.memmap(fname, dtype=float, mode='w+', shape=shape)
odfs = np.memmap(fname, dtype=np.float64, mode='w+', shape=shape)
odfs[:] = 1
affine = np.eye(4)
mask = np.ones(odfs.shape[:3])
Expand Down Expand Up @@ -504,7 +504,7 @@ def test_manifest_standard(interactive=False):
sphere = get_sphere('symmetric362')
shape = (11, 11, 11, sphere.vertices.shape[0])
fid, fname = mkstemp(suffix='_odf_slicer.mmap')
odfs = np.memmap(fname, dtype=float, mode='w+', shape=shape)
odfs = np.memmap(fname, dtype=np.float64, mode='w+', shape=shape)
odfs[:] = 1
affine = np.eye(4)
mask = np.ones(odfs.shape[:3])
Expand Down
6 changes: 3 additions & 3 deletions fury/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ def _set_position(self, coords):
track_position[0] += self.track.size[0] / 2.

self.track.position = track_position
self.handle.position = self.handle.position.astype('float')
self.handle.position = self.handle.position.astype(float)
self.handle.position += coords - self.position
# Position the text below the handle.
if self.orientation == "horizontal":
Expand Down Expand Up @@ -2415,8 +2415,8 @@ def _set_position(self, coords):
track_position[0] -= self.track.size[0] / 2.
self.track.position = track_position

self.handles[0].position = self.handles[0].position.astype('float')
self.handles[1].position = self.handles[1].position.astype('float')
self.handles[0].position = self.handles[0].position.astype(float)
self.handles[1].position = self.handles[1].position.astype(float)

self.handles[0].position += coords - self.position
self.handles[1].position += coords - self.position
Expand Down
2 changes: 1 addition & 1 deletion fury/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def numpy_to_vtk_cells(data, is_coords=True):
connectivity + offset information
"""
data = np.array(data,dtype="object")
data = np.array(data,dtype=object)
nb_cells = len(data)

# Get lines_array in vtk input format
Expand Down
10 changes: 3 additions & 7 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
[pytest]
filterwarnings =
ignore: Converting `np.character` to a dtype is deprecated. :DeprecationWarning
# a BIG part of 60k something warnings on pytest -svv fury/tests/test_actors.py are due to deprecated use of <np.data_type> in dipy & vtk,
# where simply data_type could be used, hence ignoring the whole packages.
# need to refactor to something where only neglect the np.data_type deprecation warnings
once:::dipy
once:::vtk

#Ignore all the deprecated method usages in site-packages.
ignore::DeprecationWarning:vtk.*:
ignore::DeprecationWarning:dipy.*:

0 comments on commit 7e53117

Please sign in to comment.