Skip to content

Numpy package update for testing on Linux#1240

Open
asmorkalov wants to merge 1 commit into
opencv:5.xfrom
asmorkalov:as/numpy_update_for_test
Open

Numpy package update for testing on Linux#1240
asmorkalov wants to merge 1 commit into
opencv:5.xfrom
asmorkalov:as/numpy_update_for_test

Conversation

@asmorkalov

@asmorkalov asmorkalov commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Previous numpy 2.26 cases issue:

======================================================================
ERROR: test_correctImage (test_ccm.photo_test.test_correctImage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.14/dist-packages/numpy/testing/_private/utils.py", line 851, in assert_array_compare
    val = comparison(x, y)
  File "/usr/local/lib/python3.14/dist-packages/numpy/testing/_private/utils.py", line 1710, in compare
    return np._core.numeric.isclose(x, y, rtol=rtol, atol=atol,
           ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                   equal_nan=equal_nan)
                                   ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/dist-packages/numpy/_core/numeric.py", line 2447, in isclose
    result = (less_equal(abs(x-y), atol + rtol * abs(y))
                             ~^~
ValueError: operands could not be broadcast together with shapes (1250100,) (0,) 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opencv/modules/python/test/test_ccm.py", line 272, in test_correctImage
    np.testing.assert_allclose(gold_img, calibratedImage, rtol=0.1, atol=0.1)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/dist-packages/numpy/testing/_private/utils.py", line 1715, in assert_allclose
    assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         verbose=verbose, header=header, equal_nan=equal_nan,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         strict=strict)
                         ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.14/dist-packages/numpy/testing/_private/utils.py", line 929, in assert_array_compare
    raise ValueError(msg)

The issue is reproducible with particular versions combination of python and numpy and looks like Numpy bug.
Most probable reason: numpy/numpy#28681

@asmorkalov asmorkalov force-pushed the as/numpy_update_for_test branch 2 times, most recently from 643af6a to 1cda076 Compare June 29, 2026 16:28
@asmorkalov asmorkalov force-pushed the as/numpy_update_for_test branch from 1cda076 to 5c08f0c Compare June 29, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant