enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.28k stars 282 forks source link

`TestArrayHandler.test_array2vtk` fails on aarch64 #1194

Open ggardet opened 1 year ago

ggardet commented 1 year ago

TestArrayHandler.test_array2vtk fails on aarch64:

[  105s] =================================== FAILURES ===================================
[  105s] _______________________ TestArrayHandler.test_array2vtk ________________________
[  105s] ../../BUILDROOT/mayavi-4.8.1-1.1.aarch64/usr/lib64/python3.10/site-packages/tvtk/tests/test_array_handler.py:95: in test_array2vtk
[  105s]     self._check_arrays(z, vtk_arr)
[  105s] ../../BUILDROOT/mayavi-4.8.1-1.1.aarch64/usr/lib64/python3.10/site-packages/tvtk/tests/test_array_handler.py:48: in _check_arrays
[  105s]     self.assertEqual(vtk_arr.GetTuple1(i), arr[i])
[  105s] E   AssertionError: 128.0 != -128

System is: openSUSE Tumbleweed aarch64

andreas-schwab commented 1 year ago

This happens because VTK_CHAR is not compatible with numpy.int8, the former is unsigned, the latter is signed.

ggardet commented 1 year ago

This happens because VTK_CHAR is not compatible with numpy.int8, the former is unsigned, the latter is signed.

So, it is a test issue, not an actual bug?

andreas-schwab commented 1 year ago

$ git grep 'VTK_CHAR.*int8' tvtk/array_handler.py: vtkConstants.VTK_CHAR: numpy.int8,