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

Method test_basic

numpy/core/tests/test_function_base.py:286–293  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

284class TestLinspace:
285
286 def test_basic(self):
287 y = linspace(0, 10)
288 assert_(len(y) == 50)
289 y = linspace(2, 10, num=100)
290 assert_(y[-1] == 10)
291 y = linspace(2, 10, endpoint=False)
292 assert_(y[-1] < 10)
293 assert_raises(ValueError, linspace, 0, 10, num=-1)
294
295 def test_corner(self):
296 y = list(linspace(0, 1, 1))

Callers

nothing calls this directly

Calls 3

linspaceFunction · 0.90
assert_Function · 0.90
assert_raisesFunction · 0.90

Tested by

no test coverage detected