summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMark Wiebe <mwwiebe@gmail.com>2011-08-19 20:58:28 -0700
committerCharles Harris <charlesr.harris@gmail.com>2011-08-27 07:26:58 -0600
commit9ecf721659f84dfb760af9742eae7ba7031cfd8b (patch)
tree2cbe982592884eba136024df94ee4b38a909f48e /numpy
parent48ce84dff5e10eab4db43e6baae9265deabfdb49 (diff)
downloadnumpy-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.c8
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