We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3a78be commit 9fc06fcCopy full SHA for 9fc06fc
doc/source/reference/arrays.classes.rst
@@ -280,6 +280,12 @@ NumPy provides several hooks that classes can customize:
280
NumPy may also call this function without a context from non-ufuncs to
281
allow preserving subclass information.
282
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
+
289
.. note::
290
It is hoped to eventually deprecate this method in favour of
291
func:`__array_ufunc__` for ufuncs (and :func:`__array_function__`
0 commit comments