diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e6e7393589c..bfc279dc03f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -116,6 +116,7 @@ In addition, this release completes implementation of `dpnp.fft` module and adds * Improved implementation of `dpnp.kron` to avoid unnecessary copy for non-contiguous arrays [#2059](https://github.com/IntelPython/dpnp/pull/2059) * Updated the test suit for `dpnp.fft` module [#2071](https://github.com/IntelPython/dpnp/pull/2071) * Reworked `dpnp.clip` implementation to align with Python Array API 2023.12 specification [#2048](https://github.com/IntelPython/dpnp/pull/2048) +* Skipped outdated tests for `dpnp.linalg.solve` due to compatibility issues with NumPy 2.0 [#2074](https://github.com/IntelPython/dpnp/pull/2074) ### Fixed diff --git a/tests/third_party/cupy/linalg_tests/test_solve.py b/tests/third_party/cupy/linalg_tests/test_solve.py index dd15e8303af9..d7204f7d4c14 100644 --- a/tests/third_party/cupy/linalg_tests/test_solve.py +++ b/tests/third_party/cupy/linalg_tests/test_solve.py @@ -50,14 +50,20 @@ def check_x(self, a_shape, b_shape, xp, dtype): def test_solve(self): self.check_x((4, 4), (4,)) self.check_x((5, 5), (5, 2)) - self.check_x((2, 4, 4), (2, 4)) self.check_x((2, 5, 5), (2, 5, 2)) - self.check_x((2, 3, 2, 2), (2, 3, 2)) self.check_x((2, 3, 3, 3), (2, 3, 3, 2)) self.check_x((0, 0), (0,)) self.check_x((0, 0), (0, 2)) - self.check_x((0, 2, 2), (0, 2)) self.check_x((0, 2, 2), (0, 2, 3)) + # In numpy 2.0 the broadcast ambiguity has been removed and now + # b is treaded as a single vector if and only if it is 1-dimensional; + # for other cases this signature must be followed + # (..., m, m), (..., m, n) -> (..., m, n) + # https://github.com/numpy/numpy/pull/25914 + if numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0": + self.check_x((2, 4, 4), (2, 4)) + self.check_x((2, 3, 2, 2), (2, 3, 2)) + self.check_x((0, 2, 2), (0, 2)) def check_shape(self, a_shape, b_shape, error_types): for xp, error_type in error_types.items(): @@ -90,7 +96,9 @@ def test_invalid_shape(self): self.check_shape((3, 3), (2,), value_errors) self.check_shape((3, 3), (2, 2), value_errors) self.check_shape((3, 3, 4), (3,), linalg_errors) - self.check_shape((2, 3, 3), (3,), value_errors) + # Since numpy >= 2.0, this case does not raise an error + if numpy.lib.NumpyVersion(numpy.__version__) < "2.0.0": + self.check_shape((2, 3, 3), (3,), value_errors) self.check_shape((3, 3), (0,), value_errors) self.check_shape((0, 3, 4), (3,), linalg_errors)