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

Function test_linspace_errors

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

Source from the content-addressed store, hash-verified

100
101
102def test_linspace_errors():
103 linspace(0, 1, 10, device="cpu") # Doesn't error
104 assert_raises(ValueError, lambda: linspace(0, 1, 10, device="gpu"))
105 assert_raises(ValueError, lambda: linspace(0, 1, 10, dtype=float))
106 assert_raises(ValueError, lambda: linspace(0, 1, 10, dtype="f"))
107
108
109def test_ones_errors():

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
linspaceFunction · 0.50

Tested by

no test coverage detected