Optimal way of converting zarr array to numpy array #1050
-
Dear all, Could you tell me what is the optimal way of converting zarr array to numpy array? Currently I am using:
But this, as far as I understand, loads entire array into memory. Are there better alternatives? Best regards,
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Thanks for your question @aliaksei-chareshneu!
A numpy array is in memory, by definition. So if you want to convert your zarr array to numpy array, you have to load it into memory. Perhaps you could say more about what you hope to achieve. What would "optimal" mean to you here? |
Beta Was this translation helpful? Give feedback.
-
@rabernat, thank you for the clarification. Well, I just think of reducing memory consumption when possible. |
Beta Was this translation helpful? Give feedback.
-
Yes, there is another option! If you want to compute on your array but it's too big to fit in memory, you should use Dask Arrays. Dask can load directly from Zarr. |
Beta Was this translation helpful? Give feedback.
Yes, there is another option! If you want to compute on your array but it's too big to fit in memory, you should use Dask Arrays. Dask can load directly from Zarr.