Skip to content

Commit

Permalink
Ignore DeprecationWarning in test for cupyx.scipy.linalg.kron
Browse files Browse the repository at this point in the history
  • Loading branch information
asi1024 committed Jan 24, 2025
1 parent f72cee4 commit 2385e1f
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 2385e1f

Please sign in to comment.