diff options
author | Greg Lucas <greg.m.lucas@gmail.com> | 2021-04-13 20:06:14 -0600 |
---|---|---|
committer | Greg Lucas <greg.m.lucas@gmail.com> | 2022-07-13 11:39:15 -0600 |
commit | fe8b171965d23fc79bd9fc80838debc588e4f376 (patch) | |
tree | 56b165bded453fb550a84309896684d01aa79151 | |
parent | a8b0893fc6762bef65e07a699060e015d5e98a98 (diff) | |
download | numpy-fe8b171965d23fc79bd9fc80838debc588e4f376.tar.gz |
DOC: Adding improvement note for MaskedArray ufunc
-rw-r--r-- | doc/release/upcoming_changes/16022.improvement.rst | 9 |
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. |