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:55–67  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

53 assert_array_equal(y, [1, 10, 100, 1e3, 1e4, 1e5, 1e6])
54
55 def test_start_stop_array(self):
56 start = array([0., 1.])
57 stop = array([6., 7.])
58 t1 = logspace(start, stop, 6)
59 t2 = stack([logspace(_start, _stop, 6)
60 for _start, _stop in zip(start, stop)], axis=1)
61 assert_equal(t1, t2)
62 t3 = logspace(start, stop[0], 6)
63 t4 = stack([logspace(_start, stop[0], 6)
64 for _start in start], axis=1)
65 assert_equal(t3, t4)
66 t5 = logspace(start, stop, 6, axis=-1)
67 assert_equal(t5, t2.T)
68
69 @pytest.mark.parametrize("axis", [0, 1, -1])
70 def test_base_array(self, axis: int):

Callers

nothing calls this directly

Calls 4

arrayFunction · 0.90
logspaceFunction · 0.90
stackFunction · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected