Skip to content

Commit

Permalink
Merge pull request cupy#8902 from chainer-ci/bp-8885-v13-deprecate-sc…
Browse files Browse the repository at this point in the history
…ipy-kron

[backport] Deprecate `cupyx.scipy.linalg.kron`
  • Loading branch information
kmaehashi authored Feb 6, 2025
2 parents 0609455 + 2385e1f commit 9b167f0
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import unittest
import warnings

from cupy import testing
import cupyx.scipy.linalg # NOQA
Expand Down Expand Up @@ -63,7 +64,13 @@ class TestSpecialMatrices(TestSpecialMatricesBase):
accept_error=ValueError)
def test_special_matrix(self, xp, scp):
function = getattr(scp.linalg, self.function)
return function(*[self._get_arg(xp, arg) for arg in self.args])

if self.function == "kron":
with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=DeprecationWarning)
return function(*[self._get_arg(xp, arg) for arg in self.args])
else:
return function(*[self._get_arg(xp, arg) for arg in self.args])


@testing.parameterize(*(
Expand Down

0 comments on commit 9b167f0

Please sign in to comment.