shithub: aubio

Download patch

ref: 48105cabe134711e7a25e063e135fa06c8d8a6df
parent: 776d65bfad94b7e63a00f5cd98110af45117810b
author: Paul Brossier <piem@piem.org>
date: Fri Dec 21 09:58:39 EST 2018

Revert "[py] avoid resizing py-source output"

This reverts commit 8e76c71be6136f4e2289f8c67e422097f5e10dfe.

No need to copy here, the culprit should be in py-sink.c.

--- a/python/ext/py-source.c
+++ b/python/ext/py-source.c
@@ -573,9 +573,7 @@
       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);