fixed resizing of digital frames
This commit is contained in:
@ -136,12 +136,18 @@ static PyObject *RawFileReader_read(RawFileReader *self, PyObject *args) {
|
||||
// resize the array to match the number of clusters read
|
||||
PyArray_Resize((PyArrayObject *)frames, &new_shape, 1, NPY_ANYORDER);
|
||||
|
||||
if(digital_frames){
|
||||
PyArray_Resize((PyArrayObject *)digital_frames, &new_shape, 1, NPY_ANYORDER);
|
||||
}
|
||||
|
||||
// if we also read header we need to reshape the header
|
||||
if (self->read_header) {
|
||||
new_shape.len = 1;
|
||||
PyArray_Resize((PyArrayObject *)header, &new_shape, 1,
|
||||
NPY_ANYORDER);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Build up a tuple with the return values
|
||||
|
Reference in New Issue
Block a user