Skip to content

Commit fbe3cf0

Browse files
committed
Add an elementwise test for multiply
1 parent a642929 commit fbe3cf0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

array_api_tests/test_elementwise_functions.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def test_add(args):
116116
x1, x2 = args
117117
sanity_check(x1, x2)
118118
a = _array_module.add(x1, x2)
119+
119120
b = _array_module.add(x2, x1)
120121
# add is commutative
121122
assert_exactly_equal(a, b)
@@ -738,7 +739,11 @@ def test_logical_xor(args):
738739
def test_multiply(args):
739740
x1, x2 = args
740741
sanity_check(x1, x2)
741-
# a = _array_module.multiply(x1, x2)
742+
a = _array_module.multiply(x1, x2)
743+
744+
b = _array_module.multiply(x2, x1)
745+
# multiply is commutative
746+
assert_exactly_equal(a, b)
742747

743748
@given(numeric_scalars)
744749
def test_negative(x):

0 commit comments

Comments
 (0)