-
-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
Description
In certain cases, numpy can return a dimension that is 0. This is different from reducing the dimension so the dimension is missing. Therefore, in numpy you can have shape like (1000, 0, 0), which is actually empty data-wise but it is internally consistent. In such case zarr seems to fail:
In [68]: import zarr
In [69]: arr = zarr.empty((1000, 0, 0), dtype='float64')
/.../site-packages/zarr/util.py:48: RuntimeWarning: divide by zero encountered in log10
target_size = CHUNK_BASE * (2**np.log10(dset_size/(1024.*1024)))
where it would work in numpy:
In [70]: import numpy
In [71]: arr = numpy.empty((1000, 0, 0), dtype='float64')
In [72]: print arr
[]
In [73]: print arr.shape
(1000, 0, 0)
jakirkham
Metadata
Metadata
Assignees
Labels
No labels