We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e8f351 commit 378cbafCopy full SHA for 378cbaf
src/zarr/core/array.py
@@ -980,7 +980,7 @@ def nbytes(self) -> int:
980
The number of bytes that can be stored in the chunks of this array.
981
"""
982
# TODO: how can this be meaningful for variable-length types?
983
- return int(np.prod(self.shape) * self.dtype.itemsize)
+ return self.size * self.dtype.itemsize
984
985
async def _get_selection(
986
self,
@@ -1430,7 +1430,7 @@ def _info(
1430
_order=self.order,
1431
_read_only=self.read_only,
1432
_store_type=type(self.store_path.store).__name__,
1433
- _count_bytes=self.dtype.itemsize * self.size,
+ _count_bytes=self.nbytes,
1434
_count_bytes_stored=count_bytes_stored,
1435
_count_chunks_initialized=count_chunks_initialized,
1436
**kwargs,
0 commit comments