@@ -209,7 +209,6 @@ def test_inplace_operator_returns_array_with_correct_dtype(
209
209
assert x1 .dtype == out_dtype , f'{ x1 .dtype = !s} , but should be { out_dtype } '
210
210
211
211
212
- finite_kw = {'allow_nan' : False , 'allow_infinity' : False }
213
212
ScalarType = Union [Type [bool ], Type [int ], Type [float ]]
214
213
215
214
@@ -239,7 +238,8 @@ def gen_op_scalar_params() -> Iterator[Tuple[str, DT, ScalarType, DT, Callable]]
239
238
def test_binary_operator_promotes_python_scalars (
240
239
expr , in_dtype , in_stype , out_dtype , x_filter , data
241
240
):
242
- s = data .draw (xps .from_dtype (in_dtype , ** finite_kw ).map (in_stype ), label = 'scalar' )
241
+ kw = {k : in_stype is float for k in ('allow_nan' , 'allow_infinity' )}
242
+ s = data .draw (xps .from_dtype (in_dtype , ** kw ).map (in_stype ), label = 'scalar' )
243
243
x = data .draw (
244
244
xps .arrays (dtype = in_dtype , shape = hh .shapes ).filter (x_filter ), label = 'x'
245
245
)
@@ -271,7 +271,8 @@ def gen_inplace_scalar_params() -> Iterator[Tuple[str, DT, ScalarType, Callable]
271
271
def test_inplace_operator_promotes_python_scalars (
272
272
expr , dtype , in_stype , x_filter , data
273
273
):
274
- s = data .draw (xps .from_dtype (dtype , ** finite_kw ).map (in_stype ), label = 'scalar' )
274
+ kw = {k : in_stype is float for k in ('allow_nan' , 'allow_infinity' )}
275
+ s = data .draw (xps .from_dtype (dtype , ** kw ).map (in_stype ), label = 'scalar' )
275
276
x = data .draw (xps .arrays (dtype = dtype , shape = hh .shapes ).filter (x_filter ), label = 'x' )
276
277
locals_ = {'x' : x , 's' : s }
277
278
try :
0 commit comments