@@ -331,7 +331,7 @@ def test_bitwise_xor(args):
331
331
ans = int_to_dtype (x ^ y , dtype_nbits (a .dtype ), dtype_signed (a .dtype ))
332
332
assert ans == res
333
333
334
- @given (numeric_scalars )
334
+ @given (xps . arrays ( dtype = xps . numeric_dtypes (), shape = shapes ) )
335
335
def test_ceil (x ):
336
336
# This test is almost identical to test_floor()
337
337
a = xp .ceil (x )
@@ -342,7 +342,7 @@ def test_ceil(x):
342
342
integers = isintegral (x )
343
343
assert_exactly_equal (a [integers ], x [integers ])
344
344
345
- @given (floating_scalars )
345
+ @given (xps . arrays ( dtype = xps . floating_dtypes (), shape = shapes ) )
346
346
def test_cos (x ):
347
347
a = xp .cos (x )
348
348
ONE = one (x .shape , x .dtype )
@@ -353,7 +353,7 @@ def test_cos(x):
353
353
# to nan, which is already tested in the special cases.
354
354
assert_exactly_equal (domain , codomain )
355
355
356
- @given (floating_scalars )
356
+ @given (xps . arrays ( dtype = xps . floating_dtypes (), shape = shapes ) )
357
357
def test_cosh (x ):
358
358
a = xp .cosh (x )
359
359
INFINITY = infinity (x .shape , x .dtype )
@@ -363,9 +363,9 @@ def test_cosh(x):
363
363
# mapped to nan, which is already tested in the special cases.
364
364
assert_exactly_equal (domain , codomain )
365
365
366
- @given (two_floating_dtypes . flatmap ( lambda i : two_array_scalars ( * i ) ))
367
- def test_divide (args ):
368
- x1 , x2 = args
366
+ @given (two_mutual_arrays ( floating_dtype_objects ))
367
+ def test_divide (x1_and_x2 ):
368
+ x1 , x2 = x1_and_x2
369
369
sanity_check (x1 , x2 )
370
370
xp .divide (x1 , x2 )
371
371
# There isn't much we can test here. The spec doesn't require any behavior
0 commit comments