diff options
| author | Matti Picus <matti.picus@gmail.com> | 2023-01-02 15:21:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-02 15:21:04 +0200 |
| commit | e7ef28371eaeb0cc883af8c1e602ae1d0fade178 (patch) | |
| tree | 3680cdfdfb6a7269830e848a60512ffb0e087973 /numpy | |
| parent | 6d474f2dfe5e4b7ea2a6e7423a638316fa186227 (diff) | |
| parent | 1d10a35a1e181438e39413d9ac792a97b42b58ae (diff) | |
| download | numpy-e7ef28371eaeb0cc883af8c1e602ae1d0fade178.tar.gz | |
Merge pull request #22905 from l-johnston/add_linspace_test
TST: Add linspace test case for any_step_zero and not _mult_inplace
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/tests/test_function_base.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/core/tests/test_function_base.py b/numpy/core/tests/test_function_base.py index dad7a5883..21583dd44 100644 --- a/numpy/core/tests/test_function_base.py +++ b/numpy/core/tests/test_function_base.py @@ -407,3 +407,12 @@ class TestLinspace: y = linspace(-1, 3, num=8, dtype=int) t = array([-1, -1, 0, 0, 1, 1, 2, 3], dtype=int) assert_array_equal(y, t) + + def test_any_step_zero_and_not_mult_inplace(self): + # any_step_zero is True, _mult_inplace is False + start = array([0.0, 1.0]) + stop = array([2.0, 1.0]) + y = linspace(start, stop, 3) + assert_array_equal(y, array([[0.0, 1.0], [1.0, 1.0], [2.0, 1.0]])) + + |
