This commit is contained in:
@@ -59,13 +59,13 @@ def test_nice_steps_left_aligned(start, stop, step, endpoint, expected):
|
||||
|
||||
|
||||
@pytest.mark.parametrize("start, stop, step, endpoint, expected", [
|
||||
(0, 5, 2, True, np.array([0., 2., 4.])),
|
||||
(0, 5, 2, False, np.array([0., 2.])),
|
||||
(-1, 2, 1.5, True, np.array([-1.5, 0., 1.5])),
|
||||
(-1, 2, 1.5, False, np.array([-1.5, 0.])),
|
||||
(5, 0, -2, True, np.array([0., 2., 4.])),
|
||||
(5, 0, -2, False, np.array([0., 2.])),
|
||||
(-3, 3, 2, True, np.array([-2., 0., 2.])),
|
||||
(0, 5, 2, True, np.array([1., 3., 5.])),
|
||||
(0, 5, 2, False, np.array([3., 5.])),
|
||||
(-1, 2, 1.5, True, np.array([-1., 0.5, 2.])),
|
||||
(-1, 2, 1.5, False, np.array([0.5, 2.])),
|
||||
(5, 0, -2, True, np.array([1., 3., 5.])),
|
||||
(5, 0, -2, False, np.array([3., 5.])),
|
||||
(-3, 3, 2, True, np.array([-3., -1., 1., 3.])),
|
||||
])
|
||||
def test_nice_steps_right_aligned(start, stop, step, endpoint, expected):
|
||||
np.testing.assert_allclose(nice_steps_right_aligned(start, stop, step, endpoint), expected)
|
||||
|
||||
Reference in New Issue
Block a user