pymech icon indicating copy to clipboard operation
pymech copied to clipboard

Remove `pytest.mark.xfail` from vtk tests when Mayavi supports Numpy 2.0

Open ashwinvis opened this issue 1 year ago • 1 comments

See:

  • https://github.com/enthought/mayavi/issues/1310
  • https://github.com/enthought/mayavi/pull/1303
  • https://github.com/enthought/mayavi/pull/1315

ashwinvis avatar Nov 21 '24 08:11 ashwinvis

Here is what happens with numpy 2.0

❯ python -c 'from tvtk.api import tvtk; tvtk.Hexahedron()'
Traceback (most recent call last):
  File "tvtk_classes/tvtk_helper.py", line 22, in get_module
ModuleNotFoundError: No module named 'tvtk.custom.hexahedron'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "tvtk_classes/tvtk_helper.py", line 1315, in <lambda>
  File "tvtk_classes/tvtk_helper.py", line 47, in get_class
  File "tvtk_classes/tvtk_helper.py", line 28, in get_module
  File "tvtk_classes/hexahedron.py", line 12, in <module>
  File "/home/ashwinmo/Sources/foss/pymech/.nox/tests-cov-vtk-3-10/lib/python3.10/site-packages/tvtk/array_handler.py", line 29, in <module>
    from tvtk.array_ext import set_id_type_array
  File "array_ext.pyx", line 1, in init array_ext
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

ashwinvis avatar Nov 21 '24 08:11 ashwinvis