8000 BUG: test_sq_cases fails on powerpc64 · Issue #29918 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: test_sq_cases fails on powerpc64 #29918

@OPNA2608

Description

@OPNA2608

Describe the issue:

Running the test suite on a big-endian powerpc64 machine gives me a failure. Maybe similar to #14438, but removing OpenBLAS from the build environment still makes this test fail (albeit with different values).

Reproduce the code example:

# I don't have any NumPy code of my own, just reporting a failure in your own test suite.
# You prolly know better than me how to invoke that :)

Error message:

Full error with OpenBLAS available:

FAILED lib/python3.13/site-packages/numpy/linalg/tests/test_linalg.py::TestDet::test_sq_cases - AssertionError: In test case: <LinalgCase: csingle>

Traceback (most recent call last):
  File "/nix/store/g1337qaa5692wwgzlmpfzhmvqs41whis-python3.13-numpy-2.3.2/lib/python3.13/site-packages/numpy/linalg/tests/test_linalg.py", line 386, in check_cases
    case.check(self.do)
    ~~~~~~~~~~^^^^^^^^^
  File "/nix/store/g1337qaa5692wwgzlmpfzhmvqs41whis-python3.13-numpy-2.3.2/lib/python3.13/site-packages/numpy/linalg/tests/test_linalg.py", line 116, in check
    do(self.a, self.b, tags=self.tags)
    ~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/g1337qaa5692wwgzlmpfzhmvqs41whis-python3.13-numpy-2.3.2/lib/python3.13/site-packages/numpy/linalg/tests/test_linalg.py", line 924, in do
    assert_almost_equal(np.abs(s[m]), 1)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/nix/store/g1337qaa5692wwgzlmpfzhmvqs41whis-python3.13-numpy-2.3.2/lib/python3.13/site-packages/numpy/linalg/tests/test_linalg.py", line 72, in assert_almost_equal
    old_assert_almost_equal(a, b, decimal=decimal, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/g1337qaa5692wwgzlmpfzhmvqs41whis-python3.13-numpy-2.3.2/lib/python3.13/site-packages/numpy/testing/_private/utils.py", line 620, in assert_almost_equal
    return assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/nix/store/g1337qaa5692wwgzlmpfzhmvqs41whis-python3.13-numpy-2.3.2/lib/python3.13/site-packages/numpy/testing/_private/utils.py", line 1175, in assert_array_almost_equal
    assert_array_compare(compare, actual, desired, err_msg=err_msg,
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         verbose=verbose,
                         ^^^^^^^^^^^^^^^^
             header=('Arrays are not almost equal to %d decimals' % decimal),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             precision=decimal)
             ^^^^^^^^^^^^^^^^^^
  File "/nix/store/g1337qaa5692wwgzlmpfzhmvqs41whis-python3.13-numpy-2.3.2/lib/python3.13/site-packages/numpy/testing/_private/utils.py", line 926, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 6 decimals

Mismatched elements: 1 / 1 (100%)
Max absolute difference among violations: 1.52015924
Max relative difference among violations: 1.52015924
 ACTUAL: array([2.520159], dtype=float32)
 DESIRED: array(1)

Values with OpenBLAS unavailable:

Max absolute difference among violations: 0.62125194
Max relative difference among violations: 0.62125194
 ACTUAL: array([0.378748], dtype=float32)
 DESIRED: array(1)

Python and NumPy Versions:

2.3.2
3.13.7 (main, Aug 14 2025, 11:12:11) [GCC 14.3.0]

(Same error with NumPy 2.3.3)

Runtime Environment:

[{'numpy_version': '2.3.2',
  'python': '3.13.7 (main, Aug 14 2025, 11:12:11) [GCC 14.3.0]',
  'uname': uname_result(system='Linux', node='Yubel', release='6.16.9+deb14-powerpc64', version='#1 SMP PREEMPT Debian 6.16.9-1 (2025-09-27)', machine='ppc64')},
 {'simd_extensions': {'baseline': [],
                      'found': [],
                      'not_found': ['VSX', 'VSX2', 'VSX3', 'VSX4']}},
 {'filepath': '/nix/store/cig7c4r4rlazy95bdap50c01s92ky8ix-gcc-14.3.0-lib/lib/libgomp.so.1.0.0',
  'internal_api': 'openmp',
  'num_threads': 2,
  'prefix': 'libgomp',
  'user_api': 'openmp',
  'version': None}]

Context for the issue:

Not critical since the test can be disabled, but it popped up while testing the packaging in Nixpkgs.
NixOS/nixpkgs#450059

Debian also disables this and afew more tests on similarly exotic architectures. I couldn't find any reports of these failures on your repo, maybe worth communicating with the Debian ppl to resolve these?
https://salsa.debian.org/python-team/packages/numpy/-/commit/29ab13db78935fe5cc6795dd85a969a858282fc7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0