[vtk-developers] Inconsistency in numpy_support

Berk Geveci berk.geveci at kitware.com
Tue Jan 6 11:51:21 EST 2009


Hi Prabhu,

I have been playing around with numpy-vtk array conversion. I think
there is an inconsistency in the way numpy_support converts VTK arrays
to numpy arrays. If the array has 1 component, vtk_to_numpy returns an
array of shape (10,), whereas if the array has 3 components,
vtk_to_numpy returns an array of shape (10,3). This makes the
following impossible

vtk_to_numpy(scalar) + vtk_to_numpy(vector)

Shouldn't  vtk_to_numpy return an array of shape (10,1) when converting scalars?


Happy new year!
-berk



More information about the vtk-developers mailing list