Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/numpy/numpy
/ test_allow_newaxis
Function
test_allow_newaxis
numpy/array_api/tests/test_array_object.py:343–346 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
341
assert b.dtype == np.float64
342
343
def
test_allow_newaxis():
344
a = ones(5)
345
indexed_a = a[None, :]
346
assert indexed_a.shape == (1, 5)
347
348
def
test_disallow_flat_indexing_with_newaxis():
349
a = ones((3, 3, 3))
Callers
nothing calls this directly
Calls
1
ones
Function · 0.50
Tested by
no test coverage detected