MCPcopy Create free account
hub / github.com/numpy/numpy / test_zeros_errors

Function test_zeros_errors

numpy/array_api/tests/test_creation_functions.py:123–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121
122
123def test_zeros_errors():
124 zeros((1,), device="cpu") # Doesn't error
125 assert_raises(ValueError, lambda: zeros((1,), device="gpu"))
126 assert_raises(ValueError, lambda: zeros((1,), dtype=int))
127 assert_raises(ValueError, lambda: zeros((1,), dtype="i"))
128
129
130def test_zeros_like_errors():

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
zerosFunction · 0.50

Tested by

no test coverage detected