File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change 77from .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" ,
2019 5.0 ,
2120 dpnp .float32 (6 ),
2221 dpnp .array (7 ),
23- numpy .array (8 ),
22+ numpy .array (8.0 ),
2423 ],
2524)
2625def 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" ,
You can’t perform that action at this time.
0 commit comments