Skip to content

Commit

Permalink
Update simple_structured_grid.py
Browse files Browse the repository at this point in the history
Make suggested fixes.
  • Loading branch information
prabhuramachandran authored May 23, 2024
1 parent 93882ca commit e6f3153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/mayavi/mlab/simple_structured_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
# We reorder the points, scalars and vectors so this is as per VTK's
# requirement of x first, y next and z last.
pts = pts.transpose(2, 1, 0, 3).copy()
pts.shape = int(pts.size / 3), 3
pts.shape = pts.size // 3, 3
scalars = scalars.T.copy()
vectors = vectors.transpose(2, 1, 0, 3).copy()
vectors.shape = int(vectors.size / 3), 3
vectors.shape = vectors.size // 3, 3

# Create the dataset.
sg = tvtk.StructuredGrid(dimensions=x.shape, points=pts)
Expand Down

0 comments on commit e6f3153

Please sign in to comment.