diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/release/upcoming_changes/15773.compatibility.rst | 10 | ||||
-rw-r--r-- | doc/release/upcoming_changes/15802.expired.rst | 9 | ||||
-rw-r--r-- | doc/release/upcoming_changes/15804.expired.rst | 8 | ||||
-rw-r--r-- | doc/release/upcoming_changes/15805.expired.rst | 6 | ||||
-rw-r--r-- | doc/release/upcoming_changes/15815.expired.rst | 6 | ||||
-rw-r--r-- | doc/source/reference/ufuncs.rst | 10 |
6 files changed, 44 insertions, 5 deletions
diff --git a/doc/release/upcoming_changes/15773.compatibility.rst b/doc/release/upcoming_changes/15773.compatibility.rst new file mode 100644 index 000000000..bc9d47153 --- /dev/null +++ b/doc/release/upcoming_changes/15773.compatibility.rst @@ -0,0 +1,10 @@ +``issubdtype`` no longer interprets ``float`` as ``np.floating`` +---------------------------------------------------------------- + +`numpy.issubdtype` had a FutureWarning since NumPy 1.14 which +has expired now. This means that certain input where the second +argument was neither a datatype nor a NumPy scalar type +(such as a string or a python type like ``int`` or ``float``) +will now be consistent with passing in ``np.dtype(arg2).type``. +This makes the result consistent with expectations and leads to +a false result in some cases which previously returned true. diff --git a/doc/release/upcoming_changes/15802.expired.rst b/doc/release/upcoming_changes/15802.expired.rst new file mode 100644 index 000000000..1a1b373a7 --- /dev/null +++ b/doc/release/upcoming_changes/15802.expired.rst @@ -0,0 +1,9 @@ +`numpy.insert` and `numpy.delete` can no longer be passed an axis on 0d arrays +------------------------------------------------------------------------------ +This concludes a deprecation from 1.9, where when an ``axis`` argument was +passed to a call to `~numpy.insert` and `~numpy.delete` on a 0d array, the +``axis`` and ``obj`` argument and indices would be completely ignored. +In these cases, ``insert(arr, "nonsense", 42, axis=0)`` would actually overwrite the +entire array, while ``delete(arr, "nonsense", axis=0)`` would be ``arr.copy()`` + +Now passing ``axis`` on a 0d array raises `~numpy.AxisError`. diff --git a/doc/release/upcoming_changes/15804.expired.rst b/doc/release/upcoming_changes/15804.expired.rst new file mode 100644 index 000000000..e110e1ead --- /dev/null +++ b/doc/release/upcoming_changes/15804.expired.rst @@ -0,0 +1,8 @@ +`numpy.delete` no longer ignores out-of-bounds indices +------------------------------------------------------ +This concludes deprecations from 1.8 and 1.9, where ``np.delete`` would ignore +both negative and out-of-bounds items in a sequence of indices. This was at +odds with its behavior when passed a single index. + +Now out-of-bounds items throw ``IndexError``, and negative items index from the +end. diff --git a/doc/release/upcoming_changes/15805.expired.rst b/doc/release/upcoming_changes/15805.expired.rst new file mode 100644 index 000000000..d317e98b8 --- /dev/null +++ b/doc/release/upcoming_changes/15805.expired.rst @@ -0,0 +1,6 @@ +`numpy.insert` and `numpy.delete` no longer accept non-integral indices +----------------------------------------------------------------------- +This concludes a deprecation from 1.9, where sequences of non-integers indices +were allowed and cast to integers. Now passing sequences of non-integral +indices raises ``IndexError``, just like it does when passing a single +non-integral scalar. diff --git a/doc/release/upcoming_changes/15815.expired.rst b/doc/release/upcoming_changes/15815.expired.rst new file mode 100644 index 000000000..b853cc9e5 --- /dev/null +++ b/doc/release/upcoming_changes/15815.expired.rst @@ -0,0 +1,6 @@ +`numpy.delete` no longer casts boolean indices to integers +---------------------------------------------------------- +This concludes a deprecation from 1.8, where ``np.delete`` would cast boolean +arrays and scalars passed as an index argument into integer indices. The +behavior now is to treat boolean arrays as a mask, and to raise an error +on boolean scalars. diff --git a/doc/source/reference/ufuncs.rst b/doc/source/reference/ufuncs.rst index 20c89e0b3..aad285122 100644 --- a/doc/source/reference/ufuncs.rst +++ b/doc/source/reference/ufuncs.rst @@ -441,13 +441,13 @@ advanced usage and will not typically be used. *extobj* - a list of length 1, 2, or 3 specifying the ufunc buffer-size, the - error mode integer, and the error call-back function. Normally, these + a list of length 3 specifying the ufunc buffer-size, the error + mode integer, and the error call-back function. Normally, these values are looked up in a thread-specific dictionary. Passing them here circumvents that look up and uses the low-level specification - provided for the error mode. This may be useful, for example, as an - optimization for calculations requiring many ufunc calls on small arrays - in a loop. + provided for the error mode. This may be useful, for example, as + an optimization for calculations requiring many ufunc calls on + small arrays in a loop. |