Skip to content

Commit

Permalink
DOC: Shorten release note about arr.fill() change
Browse files Browse the repository at this point in the history
Co-authored-by: Matti Picus <matti.picus@gmail.com>
  • Loading branch information
seberg and mattip committed Jun 12, 2022
1 parent eebbd6c commit f301fb1
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions doc/release/upcoming_changes/20924.compatibility.rst
Expand Up @@ -8,16 +8,4 @@ now due to the fact that the logic is aligned with item assignment::
# is now identical to:
arr[0] = scalar

When previously, effectively ``arr.fill(np.asarray(scalar))`` was used
in many cases.
The typical possible change is that errors will be given for example for
``np.array([0]).fill(1e300)`` or ``np.array([0]).fill(np.nan)``.
Previously, ``arr.fill()`` would unpack 0-D object arrays if the input
array was also of object dtype, the 0-D array will now be stored as is::

>>> arr = np.array([0], dtype=object)
>>> arr.fill(np.array(None, dtype=object))
>>> arr
array([array(None, dtype=object)], dtype=object)

Rather than ``array([None], dtype=object)``.
Previously casting may have produced slightly different answers when using values that could not be represented in the target `dtype` or when using `object`s.

0 comments on commit f301fb1

Please sign in to comment.