diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-02-25 11:28:31 -0800 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2018-02-25 11:28:31 -0800 |
commit | 8eccbf7df2f564e23c1bf7c9f5ee08e4b0dc6a36 (patch) | |
tree | 343b263cb1318c45013915e804a19102fa58d0c0 /doc | |
parent | 6d1687cbcdf32a2bde765d39394a7b2bb9838ae4 (diff) | |
download | python-numpy-8eccbf7df2f564e23c1bf7c9f5ee08e4b0dc6a36.tar.gz python-numpy-8eccbf7df2f564e23c1bf7c9f5ee08e4b0dc6a36.tar.bz2 python-numpy-8eccbf7df2f564e23c1bf7c9f5ee08e4b0dc6a36.zip |
BUG/MAINT: Remove special handling of 0d arrays and scalars in interp
These are now handled generically by the underlying C function
This fixes the period argument for 0d arrays.
Now never returns a pure-python scalar, which matches the behaviour of most of numpy.
Rework of b66a200a4a1e98f1955c8a774e4ebfb4588dab5b
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/1.15.0-notes.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/release/1.15.0-notes.rst b/doc/release/1.15.0-notes.rst index 2aa102316..eeb700812 100644 --- a/doc/release/1.15.0-notes.rst +++ b/doc/release/1.15.0-notes.rst @@ -119,5 +119,17 @@ For all types of scalar or 0d input, the result is now a scalar. ``np.flatnonzero`` now uses ``np.ravel(a)`` instead of ``a.ravel()``, so it works for lists, tuples, etc. +``np.interp`` returns numpy scalars rather than builtin scalars +--------------------------------------------------------------- +Previously ``np.interp(0.5, [0, 1], [10, 20])`` would return a ``float``, but +now it returns a ``np.float64`` object, which more closely matches the behavior +of other functions. + +Additionally, the special case of ``np.interp(object_array_0d, ...)`` is no +longer supported, as ``np.interp(object_array_nd)`` was never supported anyway. + +As a result of this change, the ``period`` argument can now be used on 0d +arrays. + Changes ======= |