From 1f45e43c307e8d93f7c6cccb5b95d4092366f5be Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Mon, 16 Jan 2006 21:57:01 +0000 Subject: Fixed uninitialized memory in real_fft. --- numpy/dft/fftpack_litemodule.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'numpy') 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; -- cgit v1.2.1