[vtkusers] equivalent to numpy_to_vtkIdTypeArray in 5.4.2?

Philip Winston pwinston at gmail.com
Mon Dec 5 10:32:05 EST 2011


I'm using this import in a Python/VTK 5.6 application:

from vtk.util.numpy_support import numpy_to_vtkIdTypeArray

I'm now trying to run on older machines with VTK 5.4.2.  This import
fails, is there an alternative way to accomplish the same thing?

The code where I use it is like:

cells.SetCells(len(tris) / 4, numpy_to_vtkIdTypeArray(tris))

Where tris is a (N, 1) numpy array of int64.

Thanks!

-Philip



More information about the vtkusers mailing list