Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fails on numpy >= 1.24 #54

Open
danigm opened this issue Mar 6, 2023 · 1 comment
Open

Tests fails on numpy >= 1.24 #54

danigm opened this issue Mar 6, 2023 · 1 comment

Comments

@danigm
Copy link

danigm commented Mar 6, 2023

With numpy 1.24 some tests are failing when mixing scalar with arrays:

FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_plus_scalar_array[n10] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_plus_scalar_array[n11] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_plus_scalar_array[n12] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_plus_scalar_array[n13] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_plus_scalar_array[n14] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_minus_scalar_array[n10] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_minus_scalar_array[n11] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_minus_scalar_array[n12] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_minus_scalar_array[n13] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_minus_scalar_array[n14] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_multiply_scalar_array[n10] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_multiply_scalar_array[n11] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_multiply_scalar_array[n12] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_multiply_scalar_array[n13] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_multiply_scalar_array[n14] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_divide_scalar_array[n10] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_divide_scalar_array[n11] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_divide_scalar_array[n12] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_divide_scalar_array[n13] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_auxiliary.py::TestExpressionArray::test_divide_scalar_array[n14] - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
FAILED blackbird_python/blackbird/tests/test_listener.py::TestParsingVariables::test_array_variable_expression - ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Mar 6, 2023
https://build.opensuse.org/request/show/1069587
by user dgarcia + dimstar_suse
- Disable numpy 1.24 broken tests, gh#XanaduAI/blackbird#54
- Remove skip_32bit_divide_scalar_array_test.patch
- Remove fix-aarch64.patch
- Update to 0.5.0
  * Rebuilds the grammar using ANTLR v4.9.2 (#51)
  * Updates ANTLR v4.9.2 version on the compiling grammar section.  (#51)
- 0.4.0
  * Remove support for Python 3.5. (#38)
  * Add support for Python 3.8 and 3.9. (#40)
  * Add public method to retrieve Blackbird program variables via
    prog.variables. (#47)
  * Improve match_template to automatically return matched parameters
    with their array values, rather than their array names (p0, p1,
    etc.) (#47)
  * Remove p-type parameters from prog.parameters since they're only
    needed there internally and are otherwise stored in
    prog.variables. This also changes TDM programs to n
@CatalinaAlbornoz
Copy link

Thank you for opening this issue @danigm! We will look into it

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

No branches or pull requests

2 participants