[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1121005: powerpc: test_arbitrary_number_of_ops_error OverflowError



Source: numpy
Version: 1:2.3.4+ds-3
Severity: normal
X-Debbugs-Cc: debian-powerpc@lists.debian.org
User: debian-powerpc@lists.debian.org
Usertags: powerpc
Control: forwarded -1 https://github.com/numpy/numpy/issues/30257#issuecomment-3552332646
Control: tags -1 patch

numpy 2.3 is failing to build on powerpc due to
test_arbitrary_number_of_ops_error failing

https://buildd.debian.org/status/fetch.php?pkg=numpy&arch=powerpc&ver=1%3A2.3.4%2Bds-3&stamp=1762186525&raw=0

______________________ test_arbitrary_number_of_ops_error ______________________

    @pytest.mark.slow
    @requires_memory(9 * np.iinfo(np.intc).max)
    def test_arbitrary_number_of_ops_error():
        # A different error may happen for more than integer operands, but that
        # is too large to test nicely.
        a = np.ones(1)
>       args = [a] * (np.iinfo(np.intc).max + 1)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       OverflowError: cannot fit 'int' into an index-sized integer

a          = array([1.])

numpy/_core/tests/test_nditer.py:3412: OverflowError



I brought it to upstream's attention.
They recommend just skipping this test on 32-bit systems.

https://github.com/numpy/numpy/issues/30257#issuecomment-3552332646

In cases like this they typically add

    @pytest.mark.skipif(not IS_64BIT, reason="test requires 64-bit system")


Reply to: