summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Lucas <greg.m.lucas@gmail.com>2021-04-13 20:06:14 -0600
committerGreg Lucas <greg.m.lucas@gmail.com>2022-07-13 11:39:15 -0600
commitfe8b171965d23fc79bd9fc80838debc588e4f376 (patch)
tree56b165bded453fb550a84309896684d01aa79151
parenta8b0893fc6762bef65e07a699060e015d5e98a98 (diff)
downloadnumpy-fe8b171965d23fc79bd9fc80838debc588e4f376.tar.gz
DOC: Adding improvement note for MaskedArray ufunc
-rw-r--r--doc/release/upcoming_changes/16022.improvement.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/16022.improvement.rst b/doc/release/upcoming_changes/16022.improvement.rst
new file mode 100644
index 000000000..0616163b9
--- /dev/null
+++ b/doc/release/upcoming_changes/16022.improvement.rst
@@ -0,0 +1,9 @@
+MaskedArray gains a ``__array_ufunc__`` method to better handle ufuncs
+----------------------------------------------------------------------
+The MaskedArray class now has an implementation of `__array_ufunc__` that
+handles deferrals to the desired implementations of the ufunc. If a masked
+implementation of a ufunc exists, that implementation will take priority.
+This means that code called with MaskedArray ma as ``np.ufunc(ma)`` will
+behave the same as ``np.ma.ufunc(ma)``. Additionally, adding this helps with
+dispatching to subclasses and preserving the proper types when another
+implementation should take priority.