diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2017-07-01 17:47:03 +0100 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2017-07-01 17:47:03 +0100 |
commit | 73f1dfe0605197e8a93e14ffc4426aad239cac62 (patch) | |
tree | dc75c8b00d41b08abfca3aac5d8eab1d6885e6ab /numpy | |
parent | 4bbbca2dda4099f689a8fb195696062ed783e4ce (diff) | |
download | numpy-73f1dfe0605197e8a93e14ffc4426aad239cac62.tar.gz |
BUG: void masked fillvalue cannot be cast to void in python 3
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/ma/core.py | 2 | ||||
-rw-r--r-- | numpy/ma/tests/test_core.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index ab4364706..09db76e32 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -186,7 +186,7 @@ default_filler = {'b': True, 'O': '?', 'S': b'N/A', 'u': 999999, - 'V': '???', + 'V': b'???', 'U': u'N/A' } diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index 707fcd1de..dc1d74790 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -1808,6 +1808,11 @@ class TestFillingValues(TestCase): assert_equal(f1, expected) assert_equal(f2, expected) + def test_default_fill_value_void(self): + dt = np.dtype([('v', 'V7')]) + f = default_fill_value(dt) + assert_equal(f['v'], np.array(default_fill_value(dt['v']), dt['v'])) + def test_fillvalue(self): # Yet more fun with the fill_value data = masked_array([1, 2, 3], fill_value=-999) |