Skip to content

Commit 4f5033c

Browse files
committed
DOC: 64 bits print 0 as 0L from vtk datasets
Work round printing difference between 32 and 64 bits for VTK datasets.
1 parent a29dc33 commit 4f5033c

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

doc/devel/code_discussions/comparisons/vtk_datasets.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Here we describe the VTK dataset model, because of some parallels with
66
our own idea of an image object. The document is from the VTK book - [VTK4]_
77

8-
See also:
8+
See also:
99

1010
* http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/data.html#vtk-data-structures
1111
* http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_datasets.html
@@ -45,14 +45,13 @@ refers to, you can identify the element.
4545

4646
>>> pts = vtk.vtkPoints()
4747
>>> id = pts.InsertNextPoint(0, 0, 0)
48-
>>> id
49-
0
48+
>>> id == 0
49+
True
5050
>>> id = pts.InsertNextPoint(0, 1, 0)
51-
>>> id
52-
1
53-
>>> pts.GetPoint(1)
54-
(0.0, 1.0, 0.0)
55-
51+
>>> id == 1
52+
True
53+
>>> pts.GetPoint(1) == (0.0, 1.0, 0.0)
54+
True
5655

5756
A dataset has one or more points
5857
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -91,8 +90,8 @@ True
9190
>>> triangle.GetCellType() == VTK_TRIANGLE
9291
True
9392
>>> pt_ids = triangle.GetPointIds() # these are default (zeros) at the moment
94-
>>> [pt_ids.GetId(i) for i in range(pt_ids.GetNumberOfIds())]
95-
[0, 0, 0]
93+
>>> [pt_ids.GetId(i) for i in range(pt_ids.GetNumberOfIds())] == [0, 0, 0]
94+
True
9695

9796
Here we set the ids. The ids refer to the points above. The system
9897
does not know this yet, but it will because, later, we are going to

0 commit comments

Comments
 (0)