Skip to content

community/py3-rpy2: fix test with numpy 2.0

mio requested to merge mio/aports:py3-rpy2 into master

Update numpy complex type reference for numpy 2.0 compatibility. Error found on the 3.21 builders (log).

        if attr in __expired_attributes__:
>           raise AttributeError(
                f"`np.{attr}` was removed in the NumPy 2.0 release. "
                f"{__expired_attributes__[attr]}",
                name=None
            )
E           AttributeError: `np.complex_` was removed in the NumPy 2.0 release. Use `np.complex128` instead.

/usr/lib/python3.12/site-packages/numpy/__init__.py:400: AttributeError

Failed test:

FAILED rpy2/tests/robjects/test_conversion_numpy.py::TestNumpyConversions::test_vector_complex

Merge request reports

Loading