diff options
author | chanley <chanley@gmail.com> | 2006-07-06 20:32:49 +0000 |
---|---|---|
committer | chanley <chanley@gmail.com> | 2006-07-06 20:32:49 +0000 |
commit | 03908e3a396a3612ce5bcc7ccd0bd40e004166ec (patch) | |
tree | 43af9e3a23bb09422b7f2b17b53484626c507f95 /numpy/numarray/_capi.c | |
parent | be3e20843fa8203cf64de8a944be95c02bde7d9b (diff) | |
download | numpy-03908e3a396a3612ce5bcc7ccd0bd40e004166ec.tar.gz |
Fix to NA_OptionalOutputArray so that resulting array is a copy of the master when the specified output array is NULL or None, i.e. omitted. flags. Submitted on behalf of jmiller.
Diffstat (limited to 'numpy/numarray/_capi.c')
-rw-r--r-- | numpy/numarray/_capi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/numarray/_capi.c b/numpy/numarray/_capi.c index d08b847e7..2de18988f 100644 --- a/numpy/numarray/_capi.c +++ b/numpy/numarray/_capi.c @@ -1077,7 +1077,8 @@ NA_OptionalOutputArray(PyObject *optional, NumarrayType t, int requires, PyArray_Descr *descr; if (t == tAny) descr=NULL; else descr = PyArray_DescrFromType(t); - rval = PyArray_FromArray(master, descr, 0); + rval = PyArray_FromArray( + master, descr, NUM_C_ARRAY | NUM_COPY | NUM_WRITABLE); return (PyArrayObject *)rval; } else { return NA_OutputArray(optional, t, requires); |