Reputation: 65
How can I get the size of a zarr group in bytes?
Upvotes: 1
Views: 215
Reputation: 39
import zarr
# Open your Zarr group
group = zarr.open_group('path_to_your_zarr_group', mode='r')
# Get the size of the group in bytes
size_in_bytes = zarr.getsize(group)
print(f"Size of Zarr group: {size_in_bytes} bytes")
Replace path_to_your_zarr_group
with the actual path to your Zarr group file or directory. This code will open the group in read-only mode and then retrieve its size in bytes using zarr.getsize()
.
Upvotes: 1