NumPower / numpower

PHP extension for efficient scientific computing and array manipulation with GPU support
https://numpower.org
Other
192 stars 4 forks source link

print_array segmentantion fault for large NDArrays #4

Closed henrique-borba closed 1 year ago

henrique-borba commented 1 year ago

There is a maximum limit of the print_matrix output which, when overflowed, does not have a specific error treatment. The method must be updated to show a preview of the array (the first and last elements of each axis)

str = (char*)malloc(100000000 * sizeof(char));

Function to update

print_array(double* buffer, int ndims, int* shape, int* strides, int cur_dim, int* index, int num_elements)