Skip to content

Commit

Permalink
set default typesize=0
Browse files Browse the repository at this point in the history
  • Loading branch information
brokkoli71 committed Sep 25, 2024
1 parent 23cf523 commit eeebe24
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/test_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_sharding(
[
codecs.transpose_codec("F"),
codecs.bytes_codec(),
codecs.blosc_codec(typesize=data.dtype.itemsize, cname="lz4"),
codecs.blosc_codec(cname="lz4"),
],
index_location=index_location,
)
Expand Down Expand Up @@ -516,7 +516,7 @@ def test_open_sharding(store: Store):
[
codecs.transpose_codec("F"),
codecs.bytes_codec(),
codecs.blosc_codec(typesize=4),
codecs.blosc_codec(),
],
)
],
Expand Down Expand Up @@ -675,7 +675,7 @@ def test_write_partial_sharded_chunks(store: Store):
chunk_shape=(10, 10),
codecs=[
codecs.bytes_codec(),
codecs.blosc_codec(typesize=data.dtype.itemsize),
codecs.blosc_codec(),
],
)
],
Expand Down
2 changes: 1 addition & 1 deletion zarrita/codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def compute_encoded_size(self, input_byte_length: int) -> int:


def blosc_codec(
typesize: int,
typesize: int = 0,
cname: Literal["lz4", "lz4hc", "blosclz", "zstd", "snappy", "zlib"] = "zstd",
clevel: int = 5,
shuffle: Literal["noshuffle", "shuffle", "bitshuffle"] = "noshuffle",
Expand Down
2 changes: 1 addition & 1 deletion zarrita/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def encode_chunk_key(self, chunk_coords: ChunkCoords) -> str:

@frozen
class BloscCodecConfigurationMetadata:
typesize: int
typesize: int = 0
cname: Literal["lz4", "lz4hc", "blosclz", "zstd", "snappy", "zlib"] = "zstd"
clevel: int = 5
shuffle: BloscShuffle = "noshuffle"
Expand Down

0 comments on commit eeebe24

Please sign in to comment.