summaryrefslogtreecommitdiff
path: root/numpy/ma
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/ma')
-rw-r--r--numpy/ma/core.py4
-rw-r--r--numpy/ma/tests/test_extras.py9
2 files changed, 11 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 69f341e8f..db8bc7d53 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -7931,9 +7931,9 @@ def load(F):
_pickle_warn('load')
if not hasattr(F, 'readline'):
with open(F, 'r') as F:
- pickle.load(F)
+ return pickle.load(F)
else:
- pickle.load(F)
+ return pickle.load(F)
def loads(strg):
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py
index 1bec584c1..af9f42c2a 100644
--- a/numpy/ma/tests/test_extras.py
+++ b/numpy/ma/tests/test_extras.py
@@ -316,6 +316,15 @@ class TestConcatenator(object):
assert_equal(type(actual), type(expected))
assert_equal(type(actual.data), type(expected.data))
+ def test_masked_constant(self):
+ actual = mr_[np.ma.masked, 1]
+ assert_equal(actual.mask, [True, False])
+ assert_equal(actual.data[1], 1)
+
+ actual = mr_[[1, 2], np.ma.masked]
+ assert_equal(actual.mask, [False, False, True])
+ assert_equal(actual.data[:2], [1, 2])
+
class TestNotMasked(object):
# Tests notmasked_edges and notmasked_contiguous.