Skip to content

Commit

Permalink
Merge pull request cupy#8884 from asi1024/signal-qdtype
Browse files Browse the repository at this point in the history
Skip some signal tests for TypeError for inputs of `np.longlong` dtype
  • Loading branch information
kmaehashi authored and chainer-ci committed Feb 20, 2025
1 parent f5e36bf commit dc17112
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

try:
import scipy.signal # NOQA
scipy_version = np.lib.NumpyVersion(scipy.__version__)
except ImportError:
pass

Expand Down Expand Up @@ -343,6 +344,9 @@ class TestOrderFilter:
@testing.numpy_cupy_allclose(atol=1e-8, rtol=1e-8, scipy_name='scp',
accept_error=ValueError) # for even kernels
def test_order_filter(self, xp, scp, dtype):
if dtype == xp.longlong and "1.15.0" <= scipy_version < "1.16.0":
# https://github.com/scipy/scipy/issues/22368
return xp.array([]) # Skip
a = testing.shaped_random(self.a, xp, dtype)
d = self.domain
d = d[:a.ndim] if isinstance(d, tuple) else (d,)*a.ndim
Expand Down Expand Up @@ -375,6 +379,9 @@ def test_medfilt_no_complex(self, xp, scp, dtype):
atol=1e-8, rtol=1e-8, scipy_name='scp',
accept_error=(ValueError, TypeError)) # for even kernels
def test_medfilt(self, xp, scp, dtype):
if dtype == xp.longlong and "1.15.0" <= scipy_version < "1.16.0":
# https://github.com/scipy/scipy/issues/22368
return xp.array([]) # Skip
if sys.platform == 'win32':
pytest.xfail('medfilt broken for Scipy 1.7.0 in windows')
volume = testing.shaped_random(self.volume, xp, dtype)
Expand Down

0 comments on commit dc17112

Please sign in to comment.