summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Kende <robert.kende@gmail.com>2012-06-11 15:42:00 +0200
committerRobert Kende <robert.kende@gmail.com>2012-06-11 15:44:53 +0200
commite2ec1eaa235dd60ecf768b89d22aa5a35395882a (patch)
treef2d692de086a8bd279d5ad48ee46fbf637069806
parenta0d1a961a9e3428d378e2189b8c337cc629a2fae (diff)
downloadnumpy-e2ec1eaa235dd60ecf768b89d22aa5a35395882a.tar.gz
TST: pickling MaskedConstant
-rw-r--r--numpy/ma/tests/test_core.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
index 0175c1213..58f81b071 100644
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -385,6 +385,16 @@ class TestMaskedArray(TestCase):
assert_equal(a_pickled, a)
self.assertTrue(isinstance(a_pickled._data, np.matrix))
+ def test_pickling_maskedconstant(self):
+ "Test pickling MaskedConstant"
+
+ import cPickle
+ mc = np.ma.masked
+ mc_pickled = cPickle.loads(mc.dumps())
+ assert_equal(mc_pickled._baseclass, mc._baseclass)
+ assert_equal(mc_pickled._mask, mc._mask)
+ assert_equal(mc_pickled._data, mc._data)
+
def test_pickling_wstructured(self):
"Tests pickling w/ structured array"
import cPickle