diff options
author | Mark Wiebe <mwiebe@enthought.com> | 2011-07-26 12:27:34 -0500 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:47 -0600 |
commit | 25a64c8023d00fe69daa72b09469b2c60ede03ac (patch) | |
tree | 2649ca3cb69ddccc25de664c37ea4e79231fdf77 /numpy | |
parent | 0cc2e75cd160c44dba1dbcadfb530cfbe7d0cf98 (diff) | |
download | numpy-25a64c8023d00fe69daa72b09469b2c60ede03ac.tar.gz |
BLD: missingdata: Signature of arraydescr_short_construction_repr changed
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/na_singleton.c | 2 | ||||
-rw-r--r-- | numpy/core/tests/test_na.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/na_singleton.c b/numpy/core/src/multiarray/na_singleton.c index fde42f7e5..f3cb1ac16 100644 --- a/numpy/core/src/multiarray/na_singleton.c +++ b/numpy/core/src/multiarray/na_singleton.c @@ -120,7 +120,7 @@ na_repr(NpyNA_fields *self) s = PyUString_FromFormat("NA(%d, dtype=", (int)self->payload); } PyUString_ConcatAndDel(&s, - arraydescr_short_construction_repr(self->dtype)); + arraydescr_short_construction_repr(self->dtype, 1)); PyUString_ConcatAndDel(&s, PyUString_FromString(")")); return s; diff --git a/numpy/core/tests/test_na.py b/numpy/core/tests/test_na.py index 7da6934de..bc2e98fb3 100644 --- a/numpy/core/tests/test_na.py +++ b/numpy/core/tests/test_na.py @@ -173,9 +173,12 @@ def test_maskna_construction(): # Construction with NA inputs a = np.array([1.0, 2.0, np.NA, 7.0], maskna=True) assert_equal(a.dtype, np.dtype('f8')) + assert_(a.flags.maskna) + assert_equal(type(a[2]), np.NAType) # Without the 'maskna=True', produces an object array a = np.array([1.0, 2.0, np.NA, 7.0]) assert_equal(a.dtype, np.dtype('O')) + assert_equal(type(a[2]), np.NAType) if __name__ == "__main__": run_module_suite() |