@@ -74,7 +74,6 @@ def get_id(val):
7474 return val .__str__ ()
7575
7676
77- @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
7877@pytest .mark .usefixtures ("suppress_divide_invalid_numpy_warnings" )
7978@pytest .mark .parametrize ("test_cases" , test_cases , ids = get_id )
8079def test_umaths (test_cases ):
@@ -134,7 +133,9 @@ def _get_output_data_type(dtype):
134133
135134
136135class TestArctan2 :
137- @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_complex = True ))
136+ @pytest .mark .parametrize (
137+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )
138+ )
138139 def test_arctan2 (self , dtype ):
139140 a = generate_random_numpy_array (10 , dtype , low = 0 )
140141 b = generate_random_numpy_array (10 , dtype , low = 0 )
@@ -149,10 +150,10 @@ def test_arctan2(self, dtype):
149150 assert_dtype_allclose (result , expected )
150151
151152 @pytest .mark .parametrize (
152- "dtype" , get_all_dtypes (no_complex = True , no_none = True )[:- 1 ]
153+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )[:- 1 ]
153154 )
154155 def test_invalid_dtype (self , dtype ):
155- dpnp_dtype = get_all_dtypes (no_complex = True , no_none = True )[- 1 ]
156+ dpnp_dtype = get_all_dtypes (no_none = True , no_complex = True )[- 1 ]
156157 a = dpnp .arange (10 , dtype = dpnp_dtype )
157158 iout = dpnp .empty (10 , dtype = dtype )
158159
@@ -178,7 +179,9 @@ def test_alias(self):
178179
179180
180181class TestCbrt :
181- @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_complex = True ))
182+ @pytest .mark .parametrize (
183+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )
184+ )
182185 def test_cbrt (self , dtype ):
183186 a = generate_random_numpy_array (10 , dtype )
184187 expected = numpy .cbrt (a )
@@ -192,10 +195,10 @@ def test_cbrt(self, dtype):
192195 assert_dtype_allclose (result , expected )
193196
194197 @pytest .mark .parametrize (
195- "dtype" , get_all_dtypes (no_complex = True , no_none = True )[:- 1 ]
198+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )[:- 1 ]
196199 )
197200 def test_invalid_dtype (self , dtype ):
198- dpnp_dtype = get_all_dtypes (no_complex = True , no_none = True )[- 1 ]
201+ dpnp_dtype = get_all_dtypes (no_none = True , no_complex = True )[- 1 ]
199202 a = dpnp .arange (10 , dtype = dpnp_dtype )
200203 iout = dpnp .empty (10 , dtype = dtype )
201204
@@ -214,7 +217,9 @@ def test_invalid_shape(self, shape):
214217
215218
216219class TestCopySign :
217- @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_complex = True ))
220+ @pytest .mark .parametrize (
221+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )
222+ )
218223 def test_copysign (self , dtype ):
219224 a = generate_random_numpy_array (10 , dtype , low = 0 )
220225 b = generate_random_numpy_array (10 , dtype , low = 0 )
@@ -229,10 +234,10 @@ def test_copysign(self, dtype):
229234 assert_dtype_allclose (result , expected )
230235
231236 @pytest .mark .parametrize (
232- "dtype" , get_all_dtypes (no_complex = True , no_none = True )[:- 1 ]
237+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )[:- 1 ]
233238 )
234239 def test_invalid_dtype (self , dtype ):
235- dpnp_dtype = get_all_dtypes (no_complex = True , no_none = True )[- 1 ]
240+ dpnp_dtype = get_all_dtypes (no_none = True , no_complex = True )[- 1 ]
236241 a = dpnp .arange (10 , dtype = dpnp_dtype )
237242 iout = dpnp .empty (10 , dtype = dtype )
238243 with pytest .raises (ValueError ):
@@ -331,7 +336,9 @@ def test_nan_infs_base(self, exp_val, dtype):
331336
332337
333338class TestLogAddExp :
334- @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_complex = True ))
339+ @pytest .mark .parametrize (
340+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )
341+ )
335342 def test_logaddexp (self , dtype ):
336343 a = generate_random_numpy_array (10 , dtype , low = 0 )
337344 b = generate_random_numpy_array (10 , dtype , low = 0 )
@@ -346,10 +353,10 @@ def test_logaddexp(self, dtype):
346353 assert_dtype_allclose (result , expected )
347354
348355 @pytest .mark .parametrize (
349- "dtype" , get_all_dtypes (no_complex = True , no_none = True )[:- 1 ]
356+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )[:- 1 ]
350357 )
351358 def test_invalid_dtype (self , dtype ):
352- dpnp_dtype = get_all_dtypes (no_complex = True , no_none = True )[- 1 ]
359+ dpnp_dtype = get_all_dtypes (no_none = True , no_complex = True )[- 1 ]
353360 a = dpnp .arange (10 , dtype = dpnp_dtype )
354361 iout = dpnp .empty (10 , dtype = dtype )
355362 with pytest .raises (ValueError ):
@@ -510,7 +517,9 @@ def test_invalid_shape(self, shape):
510517
511518class TestRsqrt :
512519 @pytest .mark .usefixtures ("suppress_divide_numpy_warnings" )
513- @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_complex = True ))
520+ @pytest .mark .parametrize (
521+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )
522+ )
514523 def test_rsqrt (self , dtype ):
515524 a = generate_random_numpy_array (10 , dtype , low = 0 )
516525 expected = numpy .reciprocal (numpy .sqrt (a ))
@@ -524,10 +533,10 @@ def test_rsqrt(self, dtype):
524533 assert_dtype_allclose (result , expected )
525534
526535 @pytest .mark .parametrize (
527- "dtype" , get_all_dtypes (no_complex = True , no_none = True )[:- 1 ]
536+ "dtype" , get_all_dtypes (no_none = True , no_complex = True )[:- 1 ]
528537 )
529538 def test_invalid_dtype (self , dtype ):
530- dpnp_dtype = get_all_dtypes (no_complex = True , no_none = True )[- 1 ]
539+ dpnp_dtype = get_all_dtypes (no_none = True , no_complex = True )[- 1 ]
531540 a = dpnp .arange (10 , dtype = dpnp_dtype )
532541 iout = dpnp .empty (10 , dtype = dtype )
533542
@@ -554,7 +563,7 @@ def test_invalid_out(self, out):
554563
555564
556565class TestSquare :
557- @pytest .mark .parametrize ("dtype" , get_all_dtypes ())
566+ @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_none = True ))
558567 def test_square (self , dtype ):
559568 a = generate_random_numpy_array (10 , dtype )
560569 expected = numpy .square (a )
0 commit comments