2929 get_float_complex_dtypes ,
3030 get_float_dtypes ,
3131 get_integer_dtypes ,
32+ get_integer_float_dtypes ,
3233 has_support_aspect16 ,
3334 has_support_aspect64 ,
3435 numpy_version ,
@@ -50,9 +51,7 @@ def test_angle_bool(self, deg):
5051 # determined by Type Promotion Rules.
5152 assert_dtype_allclose (result , expected , check_only_type_kind = True )
5253
53- @pytest .mark .parametrize (
54- "dtype" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
55- )
54+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
5655 def test_angle (self , dtype , deg ):
5756 ia = dpnp .arange (10 , dtype = dtype )
5857 a = ia .asnumpy ()
@@ -134,9 +133,7 @@ def test_mode(self):
134133
135134
136135class TestClip :
137- @pytest .mark .parametrize (
138- "dtype" , get_all_dtypes (no_bool = True , no_none = True , no_complex = True )
139- )
136+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
140137 @pytest .mark .parametrize ("order" , ["C" , "F" , "A" , "K" , None ])
141138 def test_clip (self , dtype , order ):
142139 ia = dpnp .asarray ([[1 , 2 , 8 ], [1 , 6 , 4 ], [9 , 5 , 1 ]], dtype = dtype )
@@ -148,9 +145,7 @@ def test_clip(self, dtype, order):
148145 assert expected .flags .c_contiguous == result .flags .c_contiguous
149146 assert expected .flags .f_contiguous == result .flags .f_contiguous
150147
151- @pytest .mark .parametrize (
152- "dtype" , get_all_dtypes (no_bool = True , no_none = True , no_complex = True )
153- )
148+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
154149 def test_clip_arrays (self , dtype ):
155150 ia = dpnp .asarray ([1 , 2 , 8 , 1 , 6 , 4 , 1 ], dtype = dtype )
156151 a = dpnp .asnumpy (ia )
@@ -162,9 +157,7 @@ def test_clip_arrays(self, dtype):
162157 expected = numpy .clip (a , min_v .asnumpy (), max_v .asnumpy ())
163158 assert_allclose (result , expected )
164159
165- @pytest .mark .parametrize (
166- "dtype" , get_all_dtypes (no_bool = True , no_none = True , no_complex = True )
167- )
160+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
168161 @pytest .mark .parametrize ("in_dp" , [dpnp , dpt ])
169162 @pytest .mark .parametrize ("out_dp" , [dpnp , dpt ])
170163 def test_clip_out (self , dtype , in_dp , out_dp ):
@@ -302,9 +295,7 @@ def test_axis_tuple(self):
302295 a = dpnp .ones ((3 , 4 ))
303296 assert_raises (TypeError , dpnp .cumlogsumexp , a , axis = (0 , 1 ))
304297
305- @pytest .mark .parametrize (
306- "in_dt" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
307- )
298+ @pytest .mark .parametrize ("in_dt" , get_integer_float_dtypes ())
308299 @pytest .mark .parametrize ("dt" , get_all_dtypes (no_bool = True ))
309300 def test_dtype (self , in_dt , dt ):
310301 a = dpnp .ones (100 , dtype = in_dt )
@@ -1119,9 +1110,7 @@ def test_0d(self):
11191110 na = a .asnumpy ()
11201111 assert_dtype_allclose (dpnp .i0 (a ), numpy .i0 (na ))
11211112
1122- @pytest .mark .parametrize (
1123- "dt" , get_all_dtypes (no_bool = True , no_none = True , no_complex = True )
1124- )
1113+ @pytest .mark .parametrize ("dt" , get_integer_float_dtypes ())
11251114 def test_1d (self , dt ):
11261115 a = numpy .array (
11271116 [0.49842636 , 0.6969809 , 0.22011976 , 0.0155549 , 10.0 ], dtype = dt
@@ -1225,30 +1214,24 @@ def test_add(self, dtype, lhs, rhs):
12251214 def test_arctan2 (self , dtype , lhs , rhs ):
12261215 self ._test_mathematical ("arctan2" , dtype , lhs , rhs )
12271216
1228- @pytest .mark .parametrize (
1229- "dtype" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
1230- )
1217+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
12311218 def test_copysign (self , dtype , lhs , rhs ):
12321219 self ._test_mathematical ("copysign" , dtype , lhs , rhs )
12331220
12341221 @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_none = True ))
12351222 def test_divide (self , dtype , lhs , rhs ):
12361223 self ._test_mathematical ("divide" , dtype , lhs , rhs )
12371224
1238- @pytest .mark .parametrize (
1239- "dtype" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
1240- )
1225+ @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_none = True ))
12411226 def test_fmax (self , dtype , lhs , rhs ):
12421227 self ._test_mathematical ("fmax" , dtype , lhs , rhs , check_type = False )
12431228
1244- @pytest .mark .parametrize (
1245- "dtype" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
1246- )
1229+ @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_none = True ))
12471230 def test_fmin (self , dtype , lhs , rhs ):
12481231 self ._test_mathematical ("fmin" , dtype , lhs , rhs , check_type = False )
12491232
12501233 @pytest .mark .parametrize (
1251- "dtype" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
1234+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )
12521235 )
12531236 def test_fmod (self , dtype , lhs , rhs ):
12541237 if rhs == 0.3 and not has_support_aspect64 ():
@@ -1276,9 +1259,7 @@ def test_floor_divide(self, dtype, lhs, rhs):
12761259 "floor_divide" , dtype , lhs , rhs , check_type = False
12771260 )
12781261
1279- @pytest .mark .parametrize (
1280- "dtype" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
1281- )
1262+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
12821263 def test_hypot (self , dtype , lhs , rhs ):
12831264 self ._test_mathematical ("hypot" , dtype , lhs , rhs )
12841265
@@ -1838,12 +1819,7 @@ def test_rand(self, dt):
18381819 expected = numpy .unwrap (a )
18391820 assert_dtype_allclose (result , expected )
18401821
1841- @pytest .mark .parametrize (
1842- "dt" ,
1843- get_all_dtypes (
1844- no_none = True , no_bool = True , no_complex = True , no_unsigned = True
1845- ),
1846- )
1822+ @pytest .mark .parametrize ("dt" , get_integer_float_dtypes (no_unsigned = True ))
18471823 def test_period (self , dt ):
18481824 a = numpy .array ([1 , 1 + 108 ], dtype = dt )
18491825 ia = dpnp .array (a )
@@ -1853,12 +1829,7 @@ def test_period(self, dt):
18531829 expected = numpy .unwrap (a , period = 107 )
18541830 assert_array_equal (result , expected )
18551831
1856- @pytest .mark .parametrize (
1857- "dt" ,
1858- get_all_dtypes (
1859- no_none = True , no_bool = True , no_complex = True , no_unsigned = True
1860- ),
1861- )
1832+ @pytest .mark .parametrize ("dt" , get_integer_float_dtypes (no_unsigned = True ))
18621833 def test_rand_period (self , dt ):
18631834 a = generate_random_numpy_array (10 , dt , low = - 100 , high = 100 )
18641835 ia = dpnp .array (a )
@@ -2309,9 +2280,7 @@ def test_error(self, func):
23092280
23102281
23112282class TestHypot :
2312- @pytest .mark .parametrize (
2313- "dtype" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
2314- )
2283+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
23152284 def test_hypot (self , dtype ):
23162285 a = generate_random_numpy_array (10 , dtype , low = 0 )
23172286 b = generate_random_numpy_array (10 , dtype , low = 0 )
@@ -2376,9 +2345,7 @@ def test_basic(self, dtype, axis, keepdims):
23762345
23772346 assert_dtype_allclose (res , exp )
23782347
2379- @pytest .mark .parametrize (
2380- "in_dt" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
2381- )
2348+ @pytest .mark .parametrize ("in_dt" , get_integer_float_dtypes ())
23822349 @pytest .mark .parametrize ("dt" , get_all_dtypes (no_bool = True ))
23832350 def test_dtype (self , in_dt , dt ):
23842351 a = dpnp .ones (100 , dtype = in_dt )
@@ -2436,9 +2403,7 @@ def test_basic(self, dtype, axis, keepdims):
24362403
24372404 assert_dtype_allclose (res , exp )
24382405
2439- @pytest .mark .parametrize (
2440- "in_dt" , get_all_dtypes (no_none = True , no_bool = True , no_complex = True )
2441- )
2406+ @pytest .mark .parametrize ("in_dtype" , get_integer_float_dtypes ())
24422407 @pytest .mark .parametrize ("dt" , get_all_dtypes (no_bool = True ))
24432408 def test_dtype (self , in_dt , dt ):
24442409 a = dpnp .ones (99 , dtype = in_dt )
@@ -2467,9 +2432,7 @@ def test_out(self, in_dt, out_dt):
24672432 assert_allclose (result , exp , rtol = 1e-06 )
24682433
24692434
2470- @pytest .mark .parametrize (
2471- "dtype" , get_all_dtypes (no_bool = True , no_none = True , no_complex = True )
2472- )
2435+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
24732436def test_inplace_remainder (dtype ):
24742437 size = 21
24752438 a = numpy .arange (size , dtype = dtype )
@@ -2481,9 +2444,7 @@ def test_inplace_remainder(dtype):
24812444 assert_allclose (ia , a )
24822445
24832446
2484- @pytest .mark .parametrize (
2485- "dtype" , get_all_dtypes (no_bool = True , no_none = True , no_complex = True )
2486- )
2447+ @pytest .mark .parametrize ("dtype" , get_integer_float_dtypes ())
24872448def test_inplace_floor_divide (dtype ):
24882449 size = 21
24892450 a = numpy .arange (size , dtype = dtype )
0 commit comments