diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-08-19 20:58:28 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-27 07:26:58 -0600 |
commit | 9ecf721659f84dfb760af9742eae7ba7031cfd8b (patch) | |
tree | 2cbe982592884eba136024df94ee4b38a909f48e /numpy | |
parent | 48ce84dff5e10eab4db43e6baae9265deabfdb49 (diff) | |
download | numpy-9ecf721659f84dfb760af9742eae7ba7031cfd8b.tar.gz |
BUG: missingdata: np.isna function wasn't accepting object arrays
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/na_mask.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/na_mask.c b/numpy/core/src/multiarray/na_mask.c index 07aedfe9e..a57d530ab 100644 --- a/numpy/core/src/multiarray/na_mask.c +++ b/numpy/core/src/multiarray/na_mask.c @@ -413,13 +413,19 @@ PyArray_IsNA(PyObject *obj) return NULL; } + /* + * TODO: Could change this to use raw iteration to + * avoid the iterator creation overhead. + */ if (PyArray_HASMASKNA((PyArrayObject *)obj)) { NpyIter *iter; PyArrayObject *op[2] = {(PyArrayObject *)obj, NULL}; npy_uint32 flags, op_flags[2]; PyArray_Descr *op_dtypes[2] = {NULL, dtype}; - flags = NPY_ITER_EXTERNAL_LOOP | NPY_ITER_ZEROSIZE_OK; + flags = NPY_ITER_EXTERNAL_LOOP | + NPY_ITER_ZEROSIZE_OK | + NPY_ITER_REFS_OK; /* * This USE_MASKNA causes there to be 3 operands, where operand * 2 is the mask for operand 0 |