Skip to content

Commit

Permalink
Issue #6 #8 moved future warning suppression to the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
thompson318 committed Jan 16, 2020
1 parent 2670e7d commit 4b6da1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sksurgerytrackervisualisation/shapes/dynamic_point_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ def _update_actor(self):
cells = hstack((ones((number_of_points, 1), dtype=int64),
arange(number_of_points).reshape(-1, 1)))
cells = ascontiguousarray(cells, dtype=int64)
cell_array = numpy_support.numpy_to_vtk(
num_array=cells, deep=True, array_type=VTK_ID_TYPE)
with warnings.catch_warnings(): #see issue #8
warnings.simplefilter("ignore", FutureWarning)
cell_array = numpy_support.numpy_to_vtk(
num_array=cells, deep=True, array_type=VTK_ID_TYPE)

vtk_cells = vtkCellArray()

Expand All @@ -66,7 +68,5 @@ def add_point(self, point):
:param: A 3 tuple representing the point coordinate
"""
with warnings.catch_warnings(): #see issue #8
warnings.simplefilter("ignore", FutureWarning)
self._vtk_points.InsertNextPoint(point)
self._vtk_points.InsertNextPoint(point)
self._update_actor()

0 comments on commit 4b6da1d

Please sign in to comment.