Skip to content

Commit 40a626e

Browse files
committed
address review comments
1 parent 35cf20d commit 40a626e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

scipy/signal/tests/test_signaltools.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3991,6 +3991,12 @@ def test_nonnumeric_dtypes(func, xp):
39913991
func(*args, x=1.)
39923992

39933993

3994+
# XXX: restore testing on CuPy, where possible. Multiple issues in this test:
3995+
# 1. _zi functions deliberately incompatible in cupy
3996+
# (https://github.com/scipy/scipy/pull/21713#issuecomment-2417494443)
3997+
# 2. a CuPy issue to be fixed in 14.0 only
3998+
# (https://github.com/cupy/cupy/pull/8677)
3999+
# 3. an issue with CuPy's __array__ not numpy-2.0 compatible
39944000
@skip_xp_backends(cpu_only=True)
39954001
@pytest.mark.parametrize('dt', ['float32', 'float64', 'complex64', 'complex128'])
39964002
class TestSOSFilt:
@@ -4006,16 +4012,16 @@ def test_rank1(self, dt, xp):
40064012
# Test simple IIR
40074013
y_r = xp.asarray([0, 2, 4, 6, 8, 10.], dtype=dt)
40084014
sos = tf2sos(b, a)
4009-
sos = xp.asarray(sos) # XXX until tf2sos is numpy only
4015+
sos = xp.asarray(sos) # XXX while tf2sos is numpy only
40104016
assert_array_almost_equal(sosfilt(sos, x), y_r)
40114017

40124018
# Test simple FIR
4013-
b = xp.asarray([1, 1], dtype=dt)
4019+
b = xp.asarray([1, 1], dtype=dt)
40144020
# NOTE: This was changed (rel. to TestLinear...) to add a pole @zero:
40154021
a = xp.asarray([1, 0], dtype=dt)
40164022
y_r = xp.asarray([0, 1, 3, 5, 7, 9.], dtype=dt)
40174023
sos = tf2sos(b, a)
4018-
sos = xp.asarray(sos) # XXX until tf2sos is numpy only
4024+
sos = xp.asarray(sos) # XXX while tf2sos is numpy only
40194025
assert_array_almost_equal(sosfilt(sos, x), y_r)
40204026

40214027
b = xp.asarray([1.0, 1, 0])
@@ -4239,6 +4245,7 @@ def test_dtype_deprecation(self, dt, xp):
42394245
sosfilt(sos, x)
42404246

42414247

4248+
@skip_xp_backends(cpu_only=True, reason='lfilter is CPU-only compiled code')
42424249
@skip_xp_backends('jax.numpy', reason='item assignment')
42434250
class TestDeconvolve:
42444251

0 commit comments

Comments
 (0)