Skip to content
Snippets Groups Projects
Commit 724fe4bd authored by Dan Lipsa's avatar Dan Lipsa Committed by Kitware Robot
Browse files

Merge topic 'pytest_fixes'


9a49406c Fix structured grid dimensions

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarbuildbot <buildbot@kitware.com>
Reviewed-by: default avatarSebastien Jourdain <sebastien.jourdain@kitware.com>
Merge-request: !11826
parents e93594e7 9a49406c
No related branches found
No related tags found
No related merge requests found
......@@ -773,21 +773,26 @@ class StructuredGrid(PointSet, vtkStructuredGrid):
if not NUMPY_AVAILABLE:
raise NotImplementedError("Only available with numpy")
return self.points[:, 0].reshape(self.dimensions, order="F")
dims = [0,0,0]
self.GetDimensions(dims)
return self.points[:, 0].reshape(dims, order="F")
@property
def y_coordinates(self):
if not NUMPY_AVAILABLE:
raise NotImplementedError("Only available with numpy")
return self.points[:, 1].reshape(self.dimensions, order="F")
dims = [0,0,0]
self.GetDimensions(dims)
return self.points[:, 1].reshape(dims, order="F")
@property
def z_coordinates(self):
if not NUMPY_AVAILABLE:
raise NotImplementedError("Only available with numpy")
return self.points[:, 2].reshape(self.dimensions, order="F")
dims = [0,0,0]
self.GetDimensions(dims)
return self.points[:, 2].reshape(dims, order="F")
# -----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment