-
-
Notifications
You must be signed in to change notification settings - Fork 346
Open
Labels
V2Affects the v2 branchAffects the v2 branchbugPotential issues with the zarr-python libraryPotential issues with the zarr-python library
Description
Zarr version
2.18.2
Numcodecs version
0.13.0
Python Version
3.10.4
Operating System
macOS
Installation
conda
Description
When saving an array to disk and loading it again with dimension_separator="/"
, the number of stored bytes is incorrectly reported. In this case it is just reporting the size of the .zarray
file.
Steps to reproduce
import numpy as np
import zarr
zarr_path = "test.zarr"
data = np.random.randint(0, 2**8, size=(64, 64, 64), dtype=np.uint8)
for dimension_separator in [".", "/"]:
zarr.save_array(zarr_path, data, dimension_separator=dimension_separator)
zarr_arr = zarr.open(zarr_path)
print(f"{dimension_separator=}")
print("nbytes_stored:", zarr_arr.nbytes_stored)
print()
dimension_separator='.'
nbytes_stored: 262567
dimension_separator='/'
nbytes_stored: 391
Additional output
No response
Metadata
Metadata
Assignees
Labels
V2Affects the v2 branchAffects the v2 branchbugPotential issues with the zarr-python libraryPotential issues with the zarr-python library