We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.18.2
0.13.0
3.12.4
linux
pip
Saving a boolean array to with zarr uses the same amount of space as a uint8
Type : zarr.core.Array Data type : bool Shape : (400000, 128, 128) Chunk shape : (1, 128, 128) Order : C Read-only : False Compressor : Blosc(cname='lz4', clevel=5, shuffle=SHUFFLE, blocksize=0) Store type : zarr.storage.DirectoryStore No. bytes : 6553600000 (6.1G) No. bytes stored : 370 Storage ratio : 17712432.4 Chunks initialized : 0/400000 Type : zarr.core.Array Data type : uint8 Shape : (400000, 128, 128) Chunk shape : (1, 128, 128) Order : C Read-only : False Compressor : Blosc(cname='lz4', clevel=5, shuffle=SHUFFLE, blocksize=0) Store type : zarr.storage.DirectoryStore No. bytes : 6553600000 (6.1G) No. bytes stored : 366 Storage ratio : 17906010.9 Chunks initialized : 0/400000
import numpy as np import zarr arr = zarr.open_array("./image", shape=(400000,128,128), chunks=(1,128,128), dtype=np.bool_,mode="w") print(arr.info) arr = zarr.open_array("./image", shape=(400000,128,128), chunks=(1,128,128), dtype=np.uint8,mode="w") print(arr.info)
No response
The text was updated successfully, but these errors were encountered:
this is expected, as the boolean data type is 1 byte.
Sorry, something went wrong.
Oh that's interesting thanks
Will close the issue
No branches or pull requests
Zarr version
2.18.2
Numcodecs version
0.13.0
Python Version
3.12.4
Operating System
linux
Installation
pip
Description
Saving a boolean array to with zarr uses the same amount of space as a uint8
Steps to reproduce
Additional output
No response
The text was updated successfully, but these errors were encountered: