Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ddc421

Browse files
committed
ENH: ma: use domains also in _DomainedBinaryOperation.__call__ (previously they were used only in __array_wrap__, which wouldn't be called from __div__ et al. which call the domained operations directly)
1 parent 057f902 commit 3ddc421

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

numpy/ma/core.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,10 @@ def __call__(self, a, b, *args, **kwargs):
10681068
m = ~umath.isfinite(result)
10691069
m |= ma
10701070
m |= mb
1071+
# Apply the domain
1072+
domain = ufunc_domain.get(self.f, None)
1073+
if domain is not None:
1074+
m |= filled(domain(da, db), True)
10711075
# Take care of the scalar case first
10721076
if (not m.ndim):
10731077
if m:

0 commit comments

Comments
 (0)