man-group / arctic

High performance datastore for time series and tick data
https://arctic.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
3.06k stars 583 forks source link

Handle zero rows_per_chunk for ndarray_store #940

Closed pratverma closed 2 years ago

pratverma commented 2 years ago

For large ndarrays, rows_size comes out to be greater than CHUNKS_SIZE, thus the value becomes 0. To handle division by zero, add 1 to rows_per_chunk which will not make a difference in the general case

dunckerr commented 2 years ago

Pat - why not just add this?

if rows_per_chunk == 0:
    rows_per_chunk = 1