Skip to content

Commit 6d4c812

Browse files
author
Vahid Tavanashad
committed
update-test
1 parent 61ea04a commit 6d4c812

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

dpnp/dpnp_iface_window.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ def _validate_input(val):
5555
is_array = dpnp.is_supported_array_type(val) or is_numpy_array
5656
if is_array:
5757
is_0d_arr = val.ndim == 0
58-
is_int_float = dpnp.issubdtype(val.dtype, (dpnp.integer, dpnp.floating))
59-
raise_error = not (is_0d_arr and is_int_float)
58+
is_int = dpnp.issubdtype(val.dtype, dpnp.integer)
59+
is_float = dpnp.issubdtype(val.dtype, dpnp.floating)
60+
raise_error = not (is_0d_arr and is_int or is_float)
6061
if not raise_error:
6162
is_nan = numpy.isnan(val) if is_numpy_array else dpnp.isnan(val)
6263
is_inf = numpy.isinf(val) if is_numpy_array else dpnp.isinf(val)

dpnp/tests/test_window.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from .helper import assert_dtype_allclose
88

99

10-
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
1110
@pytest.mark.parametrize("func", ["hamming"])
1211
@pytest.mark.parametrize(
1312
"M",
@@ -20,7 +19,7 @@
2019
5.0,
2120
dpnp.float32(6),
2221
dpnp.array(7),
23-
numpy.array(8),
22+
numpy.array(8.0),
2423
],
2524
)
2625
def test_window(func, M):
@@ -33,7 +32,6 @@ def test_window(func, M):
3332
assert_dtype_allclose(result, expected)
3433

3534

36-
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
3735
@pytest.mark.parametrize("func", ["hamming"])
3836
@pytest.mark.parametrize(
3937
"M",

0 commit comments

Comments
 (0)