summaryrefslogtreecommitdiff
path: root/numpy/ma/core.py
diff options
context:
space:
mode:
authorpierregm <pierregm@localhost>2008-08-25 16:36:27 +0000
committerpierregm <pierregm@localhost>2008-08-25 16:36:27 +0000
commit672fb17e079058aa1e16a0489aee83dd08adb36a (patch)
tree611d96e123811259bee2061803606e628c6bdae1 /numpy/ma/core.py
parenteb70884c2653a463ff00e331c8b90618f97b0eb0 (diff)
downloadnumpy-672fb17e079058aa1e16a0489aee83dd08adb36a.tar.gz
core : make sure that masked_equal works with a list as input
mrecords: make sure that the keys of self._optinfo are recognized as valid attributes.
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r--numpy/ma/core.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index a31cbef1b..dac79a155 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -916,9 +916,8 @@ def masked_less_equal(x, value, copy=True):
def masked_not_equal(x, value, copy=True):
"Shortcut to masked_where, with condition = (x != value)."
- return masked_where((x != value), x, copy=copy)
+ return masked_where(not_equal(x, value), x, copy=copy)
-#
def masked_equal(x, value, copy=True):
"""Shortcut to masked_where, with condition = (x == value). For
floating point, consider `masked_values(x, value)` instead.
@@ -929,7 +928,7 @@ 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((x == value), x, copy=copy)
+ return masked_where(equal(x, value), x, copy=copy)
def masked_inside(x, v1, v2, copy=True):
"""Shortcut to masked_where, where condition is True for x inside