8000 ENH: Adding __array_ufunc__ capability to MaskedArrays (again) by greglucas · Pull Request #22914 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Adding __array_ufunc__ capability to MaskedArrays (again) #22914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ab732d0
ENH: Adding __array_ufunc__ capability to MaskedArrays.
greglucas Apr 15, 2020
63df460
DOC: Adding improvement note for MaskedArray ufunc
greglucas Apr 14, 2021
a63e97a
nomask in nomask out
rcomer Jul 13, 2022
eca1e3c
BUG: fix ma.minimum.reduce with axis keyword
rcomer Jul 16, 2022
997d27d
TST: add a test for ma.minimum.reduce with axis keyword
rcomer Jul 16, 2022
bd091a6
MNT: Remove __add__ and other unnecessary overrides
greglucas Jul 23, 2022
b5b9ad3
ENH: Add sign ufunc to masked arrays
greglucas Jul 23, 2022
d0ac064
ENH: Remove masked ufunc power restriction
greglucas Jul 23, 2022
dd74620
ENH: Add masked invert ufunc
greglucas Jul 23, 2022
c638cdc
MNT: Remove some restrictions on masked array ufunc implementations
greglucas Jul 23, 2022
b35c309
FIX: Rearrange handling of ndarray-like ufuncs
greglucas Jul 24, 2022
de22beb
FIX: Pass kwargs through ufunc reduce
greglucas Jul 24, 2022
9564f27
MNT: Add power ufunc to masked arrays
greglucas Jul 24, 2022
a7ba76f
FIX: add back getmaskarray to __array_wrap__ of masked arrays
greglucas Jul 24, 2022
fa6c56f
FIX: view should return the type(self) rather than MaskedArray
greglucas Jul 24, 2022
cbfd86f
FIX: Revert sum and trace overrides from masked arrays
greglucas Jul 24, 2022
4a58583
ENH: Add rint and update round method
greglucas Jul 24, 2022
2acf530
FIX: Change back partition/argpartition
greglucas Jul 24, 2022
e6e80e6
FIX: Remove compress updates
greglucas Jul 24, 2022
366dfc3
MAINT: Remove unused delegate_binop code
greglucas Jan 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
Prev Previous commit
Next Next commit
FIX: Pass kwargs through ufunc reduce
  • Loading branch information
greglucas committed Jan 3, 2023
commit de22beb51b2821357a4ed0d73907d56fc183eb7e
7 changes: 3 additions & 4 deletions numpy/ma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# pylint: disable-msg=E1002
import builtins
import inspect
from numbers import Number
import operator
import warnings
import textwrap
Expand Down Expand Up @@ -1076,11 +1075,11 @@ def reduce(self, target, axis=0, dtype=None, **kwargs):
m.shape = (1,)

if m is nomask:
tr = self.f.reduce(t, axis)
tr = self.f.reduce(t, axis, **kwargs)
mr = nomask
else:
tr = self.f.reduce(t, axis, dtype=dtype)
mr = umath.logical_and.reduce(m, axis)
tr = self.f.reduce(t, axis, dtype=dtype, **kwargs)
mr = umath.logical_and.reduce(m, axis, **kwargs)

if not tr.shape:
if mr:
Expand Down
0