diff options
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/function_base.py | 3 | ||||
| -rw-r--r-- | numpy/core/tests/test_function_base.py | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index 46ef6d6ec..b2f17cfeb 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -36,7 +36,8 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, .. versionchanged:: 1.20.0 Values are rounded towards ``-inf`` instead of ``0`` when an - integer ``dtype`` is specified. + integer ``dtype`` is specified. The old behavior can + still be obtained with ``np.linspace(start, stop, num).astype(int)`` Parameters ---------- diff --git a/numpy/core/tests/test_function_base.py b/numpy/core/tests/test_function_base.py index bc51b8144..dad7a5883 100644 --- a/numpy/core/tests/test_function_base.py +++ b/numpy/core/tests/test_function_base.py @@ -407,5 +407,3 @@ 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) - - |
