Skip to content

Commit 9fc06fc

Browse files
authored
Update arrays.classes.rst
Reverted removing of versionchanged 2.0
1 parent c3a78be commit 9fc06fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/source/reference/arrays.classes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ NumPy provides several hooks that classes can customize:
280280
NumPy may also call this function without a context from non-ufuncs to
281281
allow preserving subclass information.
282282

283+
.. versionchanged:: 2.0
284+
``return_scalar`` is now passed as either ``False`` (usually) or ``True``
285+
indicating that NumPy would return a scalar.
286+
Subclasses may ignore the value, or return ``array[()]`` to behave more
287+
like NumPy.
288+
283289
.. note::
284290
It is hoped to eventually deprecate this method in favour of
285291
func:`__array_ufunc__` for ufuncs (and :func:`__array_function__`

0 commit comments

Comments
 (0)