summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-09-02 09:11:59 -0500
committerGitHub <noreply@github.com>2016-09-02 09:11:59 -0500
commit9164f23c19c049e28d4d4825a53bbb01aedabcfc (patch)
treef017b7eb7565690a755263df12c835d61e89a8a4 /numpy/ma/core.py
parent8eedd3e911b7e3f5f35961871ddb8ee1559d4225 (diff)
parent514d13679a55a82a96689679002c4ddc514641ce (diff)
downloadnumpy-9164f23c19c049e28d4d4825a53bbb01aedabcfc.tar.gz
Merge pull request #7099 from seberg/suppressed_warnings
Suppressed warnings
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index b01656ec9..b1e48c156 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -1032,12 +1032,7 @@ class _MaskedBinaryOperation:
if m is not nomask and m.any():
# any errors, just abort; impossible to guarantee masked values
try:
- np.copyto(result, 0, casting='unsafe', where=m)
- # avoid using "*" since this may be overlaid
- masked_da = umath.multiply(m, da)
- # only add back if it can be cast safely
- if np.can_cast(masked_da.dtype, result.dtype, casting='safe'):
- result += masked_da
+ np.copyto(result, da, casting='unsafe', where=m)
except:
pass