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

Function test_empty_like_errors

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

Source from the content-addressed store, hash-verified

72
73
74def test_empty_like_errors():
75 empty_like(asarray(1), device="cpu") # Doesn't error
76 assert_raises(ValueError, lambda: empty_like(asarray(1), device="gpu"))
77 assert_raises(ValueError, lambda: empty_like(asarray(1), dtype=int))
78 assert_raises(ValueError, lambda: empty_like(asarray(1), dtype="i"))
79
80
81def test_eye_errors():

Callers

nothing calls this directly

Calls 3

assert_raisesFunction · 0.90
empty_likeFunction · 0.50
asarrayFunction · 0.50

Tested by

no test coverage detected