summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2009-10-09 02:17:30 +0000
committerpierregm <pierregm@localhost>2009-10-09 02:17:30 +0000
commit8cad335f8b97100df988dbb6fd5d06072c667515 (patch)
tree5eb53d599da9028fc42d31ffdd979f022268a472 /numpy/ma/core.py
parente54df63621db89eddbadc7bf0f36798ee1f79e0a (diff)
downloadnumpy-8cad335f8b97100df988dbb6fd5d06072c667515.tar.gz
* ma.masked_equal : force the `fill_value` of the output to `value` (ticket #1253)
* lib._iotools: - NameValidator : add the `nbfields` optional argument to validate - add easy_dtype * lib.io.genfromtxt : - add the `autostrip` optional argument (ticket #1238) - use `invalid_raise=True` as default - use the easy_dtype mechanism (ticket #1252)
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index d32385493..cee884e9d 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -1963,7 +1963,9 @@ def masked_equal(x, value, copy=True):
# c = umath.equal(d, value)
# m = mask_or(c, getmask(x))
# return array(d, mask=m, copy=copy)
- return masked_where(equal(x, value), x, copy=copy)
+ output = masked_where(equal(x, value), x, copy=copy)
+ output.fill_value = value
+ return output
def masked_inside(x, v1, v2, copy=True):