From: Paul Brossier Date: Fri, 21 Dec 2018 13:58:39 +0000 (+0100) Subject: Revert "[py] avoid resizing py-source output" X-Git-Tag: 0.4.9~41 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=48105cabe134711e7a25e063e135fa06c8d8a6df;p=aubio.git Revert "[py] avoid resizing py-source output" This reverts commit 8e76c71be6136f4e2289f8c67e422097f5e10dfe. No need to copy here, the culprit should be in py-sink.c. --- diff --git a/python/ext/py-source.c b/python/ext/py-source.c index 909416eb..7687fbd9 100644 --- a/python/ext/py-source.c +++ b/python/ext/py-source.c @@ -573,9 +573,7 @@ static PyObject* Pyaubio_source_iter_next(Py_source *self) { return vec; } else if (PyLong_AsLong(size) > 0) { // short read, return a shorter array - PyArrayObject *shortread = (PyArrayObject*) - PyArray_FROM_OTF(PyTuple_GetItem(done, 0), NPY_NOTYPE, - NPY_ARRAY_ENSURECOPY); + PyArrayObject *shortread = (PyArrayObject*)PyTuple_GetItem(done, 0); PyArray_Dims newdims; PyObject *reshaped; newdims.len = PyArray_NDIM(shortread);