Skip to content

Commit ca2ffc0

Browse files
committed
remove NoCompressor
1 parent 52e8218 commit ca2ffc0

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/tutorial.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ the delta filter::
236236

237237
To disable compression, set ``compressor=None`` when creating an array.
238238

239+
To disable compression, set ``compression=None`` when creating an array.
240+
239241
.. _tutorial_sync:
240242

241243
Filters

zarr/core.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,11 @@ def __repr__(self):
729729

730730
# storage size info
731731
r += '\n nbytes: %s' % human_readable_size(self.nbytes)
732-
if self.nbytes_stored > 0:
733-
r += '; nbytes_stored: %s' % human_readable_size(
734-
self.nbytes_stored)
735-
r += '; ratio: %.1f' % (self.nbytes / self.nbytes_stored)
732+
if self.compression:
733+
if self.nbytes_stored > 0:
734+
r += '; nbytes_stored: %s' % human_readable_size(
735+
self.nbytes_stored)
736+
r += '; ratio: %.1f' % (self.nbytes / self.nbytes_stored)
736737
n_chunks = reduce(operator.mul, self.cdata_shape)
737738
r += '; initialized: %s/%s' % (self.initialized, n_chunks)
738739

zarr/tests/test_filters.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
BZ2(),
2222
Blosc(),
2323
]
24+
2425
if not PY2:
2526
from zarr.codecs import LZMA
2627
compressors.append(LZMA())

0 commit comments

Comments
 (0)