Closed
Description
Zarr version
v2.18.3
Numcodecs version
v0.12.1
Python Version
v3.11.2
Operating System
Linux
Installation
Using pip into virtual environment
Description
When you create a new array (e.g. using zarr.zeros
), the tuples for shape and chunks can contain float values.
The values after the decimal point are trimmed without a warning.
Is this the intended behavior?
I would expect zarr-python
to raise an exception or at least a warning.
Steps to reproduce
import zarr
z = zarr.zeros((100.4, 100.9), chunks=(10.5, 10.1), dtype="i4")
print(z.shape)
print(z.chunks)
As you can see from the output the float values are trimmed without warning:
(100, 100)
(10, 10)
Additional output
No response