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

Function test_full_like_errors

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

Source from the content-addressed store, hash-verified

93
94
95def test_full_like_errors():
96 full_like(asarray(1), 0, device="cpu") # Doesn't error
97 assert_raises(ValueError, lambda: full_like(asarray(1), 0, device="gpu"))
98 assert_raises(ValueError, lambda: full_like(asarray(1), 0, dtype=int))
99 assert_raises(ValueError, lambda: full_like(asarray(1), 0, dtype="i"))
100
101
102def test_linspace_errors():

Callers

nothing calls this directly

Calls 3

assert_raisesFunction · 0.90
full_likeFunction · 0.50
asarrayFunction · 0.50

Tested by

no test coverage detected