Skip to content

Commit 848b7b5

Browse files
committed
Use ndarrays for test_positive
1 parent db075a1 commit 848b7b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

array_api_tests/test_elementwise_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,11 +810,11 @@ def test_not_equal(args):
810810
assert aidx.shape == x1idx.shape == x2idx.shape
811811
assert bool(aidx) == (scalar_func(x1idx) != scalar_func(x2idx))
812812

813-
@given(numeric_scalars)
813+
@given(xps.arrays(dtype=xps.numeric_dtypes(), shape=shapes))
814814
def test_positive(x):
815-
a = _array_module.positive(x)
815+
out = _array_module.positive(x)
816816
# Positive does nothing
817-
assert_exactly_equal(a, x)
817+
assert_exactly_equal(out, x)
818818

819819
@given(two_mutual_arrays(floating_dtype_objects))
820820
def test_pow(x1_and_x2):

0 commit comments

Comments
 (0)