Skip to content

Commit 1079a2b

Browse files
author
Vahid Tavanashad
committed
add an assert for numpy.sign
1 parent f12771d commit 1079a2b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dpnp/tests/test_mathematical.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,6 +2319,7 @@ def test_sign(dtype):
23192319

23202320
if dtype == dpnp.bool:
23212321
assert_raises(TypeError, dpnp.sign, ia)
2322+
assert_raises(TypeError, numpy.sign, a)
23222323
else:
23232324
result = dpnp.sign(ia)
23242325
expected = numpy.sign(a)

dpnp/tests/test_strides.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def test_1arg_support_complex(func, dtype, stride):
6868
x = generate_random_numpy_array(10, dtype=dtype)
6969
a, ia = x[::stride], dpnp.array(x)[::stride]
7070

71-
if numpy_version() < "2.0.0" and func in ["sign"]:
72-
pytest.skip("numpy definition is different for complex numbers.")
71+
if numpy_version() < "2.0.0" and func == "sign":
72+
pytest.skip("numpy.sign definition is different for complex numbers.")
7373
# dpnp default is stable
7474
kwargs = {"kind": "stable"} if func == "argsort" else {}
7575
result = getattr(dpnp, func)(ia)

0 commit comments

Comments
 (0)