Skip to content

Commit

Permalink
Merge pull request #8088 from asi1024/fix-scipy1_12-filter
Browse files Browse the repository at this point in the history
Fix scipy>=1.12 filter condition
  • Loading branch information
kmaehashi committed Jan 9, 2024
2 parents 1eb425a + a080acc commit 61ef1a8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}
)
)
@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
class TestDctDst:

def _run_transform(self, dct_func, xp, dtype):
Expand Down Expand Up @@ -133,7 +133,7 @@ def test_dct_backend(self, xp, dtype):
)
)
)
@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
class TestDctnDstn():

def _run_transform(self, dct_func, xp, dtype):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def test_medfilt_no_complex(self, xp, scp, dtype):
kernel_size = kernel_size[:volume.ndim]
return scp.signal.medfilt(volume, kernel_size)

@testing.with_requires('scipy>1.11.0')
@testing.with_requires('scipy>=1.12.0rc1')
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
atol=1e-8, rtol=1e-8, scipy_name='scp',
Expand Down Expand Up @@ -400,7 +400,7 @@ def test_medfilt2d_no_complex(self, xp, scp, dtype):
kernel_size = self.kernel_size
return scp.signal.medfilt2d(input, kernel_size)

@testing.with_requires('scipy>=1.11.0')
@testing.with_requires('scipy>=1.12.0rc1')
@testing.for_all_dtypes()
@testing.numpy_cupy_allclose(
atol=1e-8, rtol=1e-8, scipy_name='scp',
Expand Down
4 changes: 2 additions & 2 deletions tests/cupyx_tests/scipy_tests/signal_tests/test_spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ def test_partial_2dperiod(self, xp, scp):
strength, phase = scp.signal.vectorstrength(events, period)
return strength, phase

@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
@testing.numpy_cupy_allclose(scipy_name='scp', rtol=1e-7, atol=1e-7)
def test_opposite_1dperiod(self, xp, scp):
events = xp.array([0, .25, .5, .75])
Expand All @@ -1304,7 +1304,7 @@ def test_opposite_1dperiod(self, xp, scp):
strength, phase = scp.signal.vectorstrength(events, period)
return strength, phase

@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
@testing.numpy_cupy_allclose(scipy_name='scp', rtol=1e-7, atol=1e-7)
def test_opposite_2dperiod(self, xp, scp):
events = xp.array([0, .25, .5, .75])
Expand Down
2 changes: 1 addition & 1 deletion tests/cupyx_tests/scipy_tests/sparse_tests/test_csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ def test_pow_float(self):
with pytest.raises(ValueError):
m ** 1.5

@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
def test_pow_list(self):
for xp, sp in ((numpy, scipy.sparse), (cupy, sparse)):
m = _make_square(xp, sp, self.dtype)
Expand Down
6 changes: 3 additions & 3 deletions tests/cupyx_tests/scipy_tests/sparse_tests/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def test_sparse(self, format, dtype, xp, sp):
M = sp.linalg.aslinearoperator(M)
return self._test_cg(dtype, xp, sp, a, M)

@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
@testing.for_dtypes('fdFD')
@testing.numpy_cupy_allclose(rtol=1e-5, atol=1e-5, sp_name='sp')
def test_empty(self, dtype, xp, sp):
Expand Down Expand Up @@ -561,7 +561,7 @@ def test_sparse(self, format, dtype, xp, sp):
M = sp.linalg.aslinearoperator(M)
return self._test_gmres(dtype, xp, sp, a, M)

@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
@testing.for_dtypes('fdFD')
@testing.numpy_cupy_allclose(rtol=1e-5, atol=1e-5, sp_name='sp')
def test_empty(self, dtype, xp, sp):
Expand Down Expand Up @@ -1545,7 +1545,7 @@ def test_sparse(self, format, dtype, xp, sp):
M = sp.linalg.aslinearoperator(M)
return self._test_cgs(dtype, xp, sp, a, M)

@testing.with_requires('scipy>1.11')
@testing.with_requires('scipy>=1.12.0rc1')
@testing.for_dtypes('fdFD')
@testing.numpy_cupy_allclose(rtol=1e-5, atol=1e-5, sp_name='sp')
def test_empty(self, dtype, xp, sp):
Expand Down

0 comments on commit 61ef1a8

Please sign in to comment.