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

Method test_start_stop_array

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

Source from the content-addressed store, hash-verified

327 assert_equal(t3, t6)
328
329 def test_start_stop_array(self):
330 start = array([-120, 120], dtype="int8")
331 stop = array([100, -100], dtype="int8")
332 t1 = linspace(start, stop, 5)
333 t2 = stack([linspace(_start, _stop, 5)
334 for _start, _stop in zip(start, stop)], axis=1)
335 assert_equal(t1, t2)
336 t3 = linspace(start, stop[0], 5)
337 t4 = stack([linspace(_start, stop[0], 5)
338 for _start in start], axis=1)
339 assert_equal(t3, t4)
340 t5 = linspace(start, stop, 5, axis=-1)
341 assert_equal(t5, t2.T)
342
343 def test_complex(self):
344 lim1 = linspace(1 + 2j, 3 + 4j, 5)

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
linspaceFunction · 0.90
stackFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected