- Timestamp:
- May 12, 2016, 1:28:23 AM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- a138975
- Parents:
- bb4af3a
- git-author:
- Paul Brossier <piem@piem.org> (05/11/16 14:49:47)
- git-committer:
- Paul Brossier <piem@piem.org> (05/12/16 01:28:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubioproxy.c
rbb4af3a r911c22f 22 22 int 23 23 PyAubio_IsValidVector (PyObject * input) { 24 npy_intp length; 24 25 if (input == NULL) { 25 26 PyErr_SetString (PyExc_ValueError, "input array is not a python object"); … … 47 48 } 48 49 49 npy_intplength = PyArray_SIZE ((PyArrayObject *)input);50 length = PyArray_SIZE ((PyArrayObject *)input); 50 51 if (length <= 0) { 51 52 PyErr_SetString (PyExc_ValueError, "input array size should be greater than 0"); … … 94 95 int 95 96 PyAubio_ArrayToCFmat (PyObject *input, fmat_t *mat) { 96 uint_t i; 97 uint_t i, new_height; 98 npy_intp length, height; 97 99 if (input == NULL) { 98 100 PyErr_SetString (PyExc_ValueError, "input array is not a python object"); … … 121 123 122 124 // no need to really allocate fvec, just its struct member 123 npy_intplength = PyArray_DIM ((PyArrayObject *)input, 1);125 length = PyArray_DIM ((PyArrayObject *)input, 1); 124 126 if (length <= 0) { 125 127 PyErr_SetString (PyExc_ValueError, "input array dimension 1 should be greater than 0"); 126 128 return 0; 127 129 } 128 npy_intpheight = PyArray_DIM ((PyArrayObject *)input, 0);130 height = PyArray_DIM ((PyArrayObject *)input, 0); 129 131 if (height <= 0) { 130 132 PyErr_SetString (PyExc_ValueError, "input array dimension 0 should be greater than 0"); … … 140 142 } 141 143 142 uint_tnew_height = (uint_t)PyArray_DIM ((PyArrayObject *)input, 0);144 new_height = (uint_t)PyArray_DIM ((PyArrayObject *)input, 0); 143 145 if (mat->height != new_height) { 144 146 if (mat->data) {
Note: See TracChangeset
for help on using the changeset viewer.