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-06-29 19:20:23 -0600 |
| commit | a819f00a5b7e2fcf875ec5694d53fda39842768b (patch) | |
| tree | da02be7b0163438ed2ce2f464fdbabd7d15710e5 | |
| parent | 1557c878d0c69ce2369924f723a459c46edc3d2d (diff) | |
| download | numpy-a819f00a5b7e2fcf875ec5694d53fda39842768b.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. |
