diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-01-16 21:57:01 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-01-16 21:57:01 +0000 |
commit | 1f45e43c307e8d93f7c6cccb5b95d4092366f5be (patch) | |
tree | 8e7077a2bdbc02e62218ccafa9f2633d619a5e42 /numpy | |
parent | edc8a8542059b76f131d5d32612543d506970a48 (diff) | |
download | numpy-1f45e43c307e8d93f7c6cccb5b95d4092366f5be.tar.gz |
Fixed uninitialized memory in real_fft.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/dft/fftpack_litemodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/dft/fftpack_litemodule.c b/numpy/dft/fftpack_litemodule.c index 4a509d26b..bc6d6bbe9 100644 --- a/numpy/dft/fftpack_litemodule.c +++ b/numpy/dft/fftpack_litemodule.c @@ -115,8 +115,8 @@ fftpack_rfftf(PyObject *self, PyObject *args) if (data == NULL) return NULL; npts = data->dimensions[data->nd-1]; data->dimensions[data->nd-1] = npts/2+1; - ret = (PyArrayObject *)PyArray_SimpleNew(data->nd, data->dimensions, - PyArray_CDOUBLE); + ret = (PyArrayObject *)PyArray_Zeros(data->nd, data->dimensions, + PyArray_DescrFromType(PyArray_CDOUBLE), 0); data->dimensions[data->nd-1] = npts; rstep = (ret->dimensions[ret->nd-1])*2; @@ -166,8 +166,8 @@ fftpack_rfftb(PyObject *self, PyObject *args) data = (PyArrayObject *)PyArray_ContiguousFromObject(op1, PyArray_CDOUBLE, 1, 0); if (data == NULL) return NULL; npts = data->dimensions[data->nd-1]; - ret = (PyArrayObject *)PyArray_SimpleNew(data->nd, data->dimensions, - PyArray_DOUBLE); + ret = (PyArrayObject *)PyArray_Zeros(data->nd, data->dimensions, + PyArray_DescrFromType(PyArray_DOUBLE), 0); if (PyArray_As1D(&op2, (char **)&wsave, &nsave, PyArray_DOUBLE) == -1) goto fail; |