Skip to content

Commit 8c4882a

Browse files
committed
Add a test that the newaxis constant exists
The spec says that this has to be an alias to None, so verify that.
1 parent f82c7bc commit 8c4882a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

array_api_tests/test_constants.py

+5
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ def test_nan():
5151
x = xp.asarray(xp.nan)
5252
assert_0d_float("nan", x)
5353
assert xp.isnan(x), "xp.isnan(xp.asarray(xp.nan))=False"
54+
55+
56+
def test_newaxis():
57+
assert hasattr(xp, "newaxis")
58+
assert xp.newaxis is None

0 commit comments

Comments
 (0)