Skip to content

Commit

Permalink
Initialize length of numpy array correctly.
Browse files Browse the repository at this point in the history
Issue:	#6
  • Loading branch information
sobomax committed Jul 29, 2024
1 parent e915513 commit c603ab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/G722_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ PyG722_decode(PyG722* self, PyObject* args) {
owner->data = array;

// Create a new numpy array to hold the integers
long dims[1] = {olength};
npy_intp dims[1] = {olength};
PyObject* numpy_array = PyArray_SimpleNewFromData(1, dims, NPY_INT16, (void *)array);
if (numpy_array == NULL) goto e1;
PyArray_SetBaseObject((PyArrayObject*)numpy_array, (PyObject*)owner);
Expand Down

0 comments on commit c603ab3

Please sign in to comment.