Changeset 8e76c71 for python


Ignore:
Timestamp:
Dec 20, 2018, 10:42:11 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
171ae68, 2b1b38a
Parents:
d4927c2
git-author:
Paul Brossier <piem@piem.org> (12/20/18 22:35:07)
git-committer:
Paul Brossier <piem@piem.org> (12/20/18 22:42:11)
Message:

[py] avoid resizing py-source output

Make sure a copy of the source output is taken before resizing it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-source.c

    rd4927c2 r8e76c71  
    574574    } else if (PyLong_AsLong(size) > 0) {
    575575      // short read, return a shorter array
    576       PyArrayObject *shortread = (PyArrayObject*)PyTuple_GetItem(done, 0);
     576      PyArrayObject *shortread = (PyArrayObject*)
     577        PyArray_FROM_OTF(PyTuple_GetItem(done, 0), NPY_NOTYPE,
     578            NPY_ARRAY_ENSURECOPY);
    577579      PyArray_Dims newdims;
    578580      PyObject *reshaped;
Note: See TracChangeset for help on using the changeset viewer.