Bug#1142638: test_explicit_structured_grid_compute_connectivity fails on 32-bit systems with vtk 9.6

Drew Parsons dparsons at debian.org
Thu Jul 23 10:40:06 BST 2026


Source: python-pyvista
Version: 0.48.4-4
Severity: serious
Control: forwarded -1 https://github.com/pyvista/pyvista/issues/8841

pyvista's tests are failing in debci on 32-bit arches (armhf and i386).

The problem appears to be triggered by vtk 9.6

The symptom is that the connectivities generated by
grid.compute_connectivity() and grid.compute_connections() have value
0, not matching the reference values.

A second observation is that the dtype is mildly discrepant (int vs
uint8 or uint32), though I don't think this would cause test error if
the values matched.

Reported upstream https://github.com/pyvista/pyvista/issues/8841
but perhaps it is a VTK issue.


e.g. on i386

$ pytest-3 -v tests/core/test_grid.py -k structured_grid_compute
==================================================================================================================== test session starts =====================================================================================================================
platform linux -- Python 3.14.6, pytest-9.1.1, pluggy-1.6.0 -- /usr/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default'
Test order randomisation NOT enabled. Enable with --random-order or --random-order-bucket=<bucket_type>
required packages: cyclopts-4.17.0, matplotlib-3.10.7+dfsg1, numpy-2.4.6, pillow-12.3.0, pooch-1.9.0, scooby-0.11.0, typing-extensions-4.16.0, vtk (not found), vtk (not found), vtk (not found), vtk (not found)
optional 'colormaps' package: colorcet-3.1.0
optional 'io' packages: imageio-2.37.4, meshio-5.3.5
optional packages not found: cmcrameri, cmocean, fsspec, pyvista-zstd, ipywidgets, jupyter-server-proxy, nest-asyncio2, trame-client, trame-server, trame-vtk, trame-vtk, trame-vuetify, trame
rootdir: /home/dparsons/pyvista/python-pyvista-0.48.4
configfile: pyproject.toml
plugins: cases-3.10.1, hypothesis-6.152.4, typeguard-4.4.4, mock-3.15.1, random-order-1.2.0+ds
collected 198 items / 196 deselected / 2 selected                                                                                                                                                                                                            

tests/core/test_grid.py::test_explicit_structured_grid_compute_connectivity FAILED                                                                                                                                                                     [ 50%]
tests/core/test_grid.py::test_explicit_structured_grid_compute_connections FAILED                                                                                                                                                                      [100%]

========================================================================================================================== FAILURES ==========================================================================================================================
_____________________________________________________________________________________________________ test_explicit_structured_grid_compute_connectivity _____________________________________________________________________________________________________

    def test_explicit_structured_grid_compute_connectivity():
        connectivity = np.asarray(
            """
        42 43 43 41 46 47 47 45 46 47 47 45 46 47 47 45 38 39 39 37 58 59 59 57
        62 63 63 61 62 63 63 61 62 63 63 61 54 55 55 53 58 59 59 57 62 63 63 61
        62 63 63 61 62 63 63 61 54 55 55 53 58 59 59 57 62 63 63 61 62 63 63 61
        62 63 63 61 54 55 55 53 58 59 59 57 62 63 63 61 62 63 63 61 62 63 63 61
        54 55 55 53 26 27 27 25 30 31 31 29 30 31 31 29 30 31 31 29 22 23 23 21
        """.split(),  # noqa: SIM905
            dtype=int,
        )
    
        grid = examples.load_explicit_structured()
        assert 'ConnectivityFlags' not in grid.cell_data
    
        copy = grid.compute_connectivity()
        assert isinstance(copy, pv.ExplicitStructuredGrid)
        assert 'ConnectivityFlags' in copy.cell_data
        assert 'ConnectivityFlags' not in grid.cell_data
>       assert np.array_equal(copy.cell_data['ConnectivityFlags'], connectivity)
E       assert False
E        +  where False = <function array_equal at 0xf5965ce0>(pyvista_ndarray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0], dtype=uint8), array([42, 43, 43, 41, 46, 47, 47, 45, 46, 47, 47, 45, 46, 47, 47, 45, 38,\n       39, 39, 37, 58, 59, 59, 57, 62, 63, 63, 61, 62, 63, 63, 61, 62, 63,\n       63, 61, 54, 55, 55, 53, 58, 59, 59, 57, 62, 63, 63, 61, 62, 63, 63,\n       61, 62, 63, 63, 61, 54, 55, 55, 53, 58, 59, 59, 57, 62, 63, 63, 61,\n       62, 63, 63, 61, 62, 63, 63, 61, 54, 55, 55, 53, 58, 59, 59, 57, 62,\n       63, 63, 61, 62, 63, 63, 61, 62, 63, 63, 61, 54, 55, 55, 53, 26, 27,\n       27, 25, 30, 31, 31, 29, 30, 31, 31, 29, 30, 31, 31, 29, 22, 23, 23,\n       21]))
E        +    where <function array_equal at 0xf5965ce0> = np.array_equal

tests/core/test_grid.py:1806: AssertionError
_____________________________________________________________________________________________________ test_explicit_structured_grid_compute_connections ______________________________________________________________________________________________________

    def test_explicit_structured_grid_compute_connections():
        connections = np.asarray(
            """
        3 4 4 3 4 5 5 4 4 5 5 4 4 5 5 4 3 4 4 3 4 5 5 4 5 6 6 5 5 6 6 5 5 6 6 5 4
        5 5 4 4 5 5 4 5 6 6 5 5 6 6 5 5 6 6 5 4 5 5 4 4 5 5 4 5 6 6 5 5 6 6 5 5 6
        6 5 4 5 5 4 4 5 5 4 5 6 6 5 5 6 6 5 5 6 6 5 4 5 5 4 3 4 4 3 4 5 5 4 4 5 5
        4 4 5 5 4 3 4 4 3
        """.split(),  # noqa: SIM905
            dtype=int,
        )
    
        grid = examples.load_explicit_structured()
        assert 'number_of_connections' not in grid.cell_data
    
        copy = grid.compute_connections()
        assert isinstance(copy, pv.ExplicitStructuredGrid)
        assert 'number_of_connections' in copy.cell_data
        assert 'number_of_connections' not in grid.cell_data
>       assert np.array_equal(copy.cell_data['number_of_connections'], connections)
E       assert False
E        +  where False = <function array_equal at 0xf5965ce0>(pyvista_ndarray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n                 0, 0, 0, 0, 0, 0], dtype=uint32), array([3, 4, 4, 3, 4, 5, 5, 4, 4, 5, 5, 4, 4, 5, 5, 4, 3, 4, 4, 3, 4, 5,\n       5, 4, 5, 6, 6, 5, 5, 6, 6, 5, 5, 6, 6, 5, 4, 5, 5, 4, 4, 5, 5, 4,\n       5, 6, 6, 5, 5, 6, 6, 5, 5, 6, 6, 5, 4, 5, 5, 4, 4, 5, 5, 4, 5, 6,\n       6, 5, 5, 6, 6, 5, 5, 6, 6, 5, 4, 5, 5, 4, 4, 5, 5, 4, 5, 6, 6, 5,\n       5, 6, 6, 5, 5, 6, 6, 5, 4, 5, 5, 4, 3, 4, 4, 3, 4, 5, 5, 4, 4, 5,\n       5, 4, 4, 5, 5, 4, 3, 4, 4, 3]))
E        +    where <function array_equal at 0xf5965ce0> = np.array_equal

tests/core/test_grid.py:1832: AssertionError
================================================================================================================== short test summary info ===================================================================================================================
FAILED tests/core/test_grid.py::test_explicit_structured_grid_compute_connectivity - assert False
FAILED tests/core/test_grid.py::test_explicit_structured_grid_compute_connections - assert False
============================================================================================================= 2 failed, 196 deselected in 0.90s ==============================================================================================================



More information about the debian-science-maintainers mailing list