[vtk-developers] The numpy dataset_adaptor and Python 3

David Gobbi david.gobbi at gmail.com
Fri Aug 7 11:21:42 EDT 2015


Right now all of the tests in Common/Core pass with Python 3 except for
TestNumpyInteface:

File
"/Users/dgobbi/Work/Kitware/vtk-gitlab/Common/Core/Testing/Python/TestNumpyInterface.py",
line 69, in <module>
     assert algs.all(1 + randomVec - 1 - randomVec < 1E-4)
TypeError: unsupported operand type(s) for +: 'int' and
'VTKCompositeDataArray'

The problem lies with the VTKArray class in dataset_adapter.py.  The custom
numeric operations work differently in Python 3, my guess is that some
extra type coercion is needed.  Can someone take a look?

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150807/c178176d/attachment.html>


More information about the vtk-developers mailing list