diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cbf75bdaf1..6bb82b02eb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -123,6 +123,7 @@ This release is compatible with NumPy 2.5. * Fixed `dpnp.__all__` missing `ndarray` and `__array_namespace_info__` and listing `mean`, `median` and `min` twice [#3100](https://github.com/IntelPython/dpnp/pull/3100) * Fixed `dpnp.repeat` and `dpnp.tensor.repeat` silently returning wrong results for `uint64` repeats above the `int64` maximum [#3115](https://github.com/IntelPython/dpnp/pull/3115) * Fixed importing `dpnp.scipy.sparse` re-enabling the GIL on free-threaded Python builds, because its pybind11 extension did not declare free-threading support [#3101](https://github.com/IntelPython/dpnp/pull/3101) +* Fixed the CuPy-based `dpnp.scipy` tests under `dpnp/tests/third_party/cupyx/scipy_tests/` missing from the `dpnp` package, so they never ran against an installed package [#3102](https://github.com/IntelPython/dpnp/pull/3102) ### Security diff --git a/dpnp/tests/third_party/cupyx/scipy_tests/sparse_tests/test_linalg.py b/dpnp/tests/third_party/cupyx/scipy_tests/sparse_tests/test_linalg.py index c77096a289c..8e5f6001da6 100644 --- a/dpnp/tests/third_party/cupyx/scipy_tests/sparse_tests/test_linalg.py +++ b/dpnp/tests/third_party/cupyx/scipy_tests/sparse_tests/test_linalg.py @@ -625,7 +625,10 @@ def _make_matrix(self): a[mask > self.density] = 0 m = None if self.M == "jacobi": - m = numpy.diag(1.0 / numpy.diag(a)) + # NOTE: at this density diag(a) is mostly zero, so upstream's + # 1/diag(a) is inf and both sides return NaN; use 1 there. + d = numpy.diag(a) + m = numpy.diag(1.0 / numpy.where(d == 0, 1, d)) return a, m def _make_normalized_vector(self): diff --git a/setup.py b/setup.py index acb8b643f80..23145fab005 100644 --- a/setup.py +++ b/setup.py @@ -69,6 +69,7 @@ "tests/third_party/cupy/*/*.py", "tests/third_party/cupyx/*.py", "tests/third_party/cupyx/*/*.py", + "tests/third_party/cupyx/*/*/*.py", ], }, include_package_data=False,