Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a50e316
feat: add cast_value and scale_offset codecs
d-v-b Apr 6, 2026
64918d4
Merge branch 'main' into feat/scale-offset-cast-value
d-v-b Apr 6, 2026
94ab34a
docs: changelog
d-v-b Apr 6, 2026
3ed9847
Merge branch 'main' into feat/scale-offset-cast-value
d-v-b Apr 7, 2026
7f5f2b2
chore: simplify scalar map handling
d-v-b Apr 7, 2026
3f8cfdb
Merge branch 'main' of https://github.com/zarr-developers/zarr-python…
d-v-b Apr 7, 2026
b35d5a3
chore: coverage
d-v-b Apr 7, 2026
0e01a21
chore: preserve JSON encoding of scale and offset parameters
d-v-b Apr 7, 2026
0d6e48d
chore: internal cleanup
d-v-b Apr 8, 2026
def02b6
Merge branch 'main' into feat/scale-offset-cast-value
d-v-b Apr 9, 2026
ff46db2
Merge branch 'main' into feat/scale-offset-cast-value
d-v-b Apr 9, 2026
ee15c9e
fix: use explicit list of data type names
d-v-b Apr 9, 2026
ae9464f
Merge branch 'main' of https://github.com/zarr-developers/zarr-python…
d-v-b Apr 9, 2026
22b6689
Merge branch 'feat/scale-offset-cast-value' of https://github.com/d-v…
d-v-b Apr 9, 2026
d1cee73
docs: add comment
d-v-b Apr 9, 2026
2e8d644
Merge branch 'main' into feat/scale-offset-cast-value
d-v-b Apr 14, 2026
5945c17
Merge branch 'main' of https://github.com/zarr-developers/zarr-python…
d-v-b Apr 15, 2026
b123813
fix: make encode / decode stricter about dtypes
d-v-b Apr 20, 2026
e8a35ab
Merge branch 'main' into feat/scale-offset-cast-value
d-v-b Apr 21, 2026
82b5d8d
Merge branch 'feat/scale-offset-cast-value' of https://github.com/d-v…
d-v-b Apr 21, 2026
8dcc4e2
test: don't use async incorrectly
d-v-b Apr 21, 2026
63aaa65
test: patch holes in test coverage
d-v-b Apr 22, 2026
2873764
Merge branch 'main' into feat/scale-offset-cast-value
d-v-b Apr 23, 2026
8ffbd94
chore: lint
d-v-b Apr 23, 2026
f484736
chore: remove cast-value-rs group, and add cast-value-rs to optional …
d-v-b Apr 23, 2026
c5d8c87
improve docstrings
d-v-b Apr 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/3874.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `cast_value` and `scale_offset` codecs.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ remote = [
gpu = [
"cupy-cuda12x",
]
cast-value-rs = ["cast-value-rs"]
cli = ["typer"]
optional = ["universal-pathlib"]

Expand Down Expand Up @@ -166,6 +167,7 @@ matrix.deps.features = [
{value = "remote", if = ["optional"]},
{value = "optional", if = ["optional"]},
{value = "cli", if = ["optional"]},
{value = "cast-value-rs", if = ["optional"]},
]
matrix.deps.dependency-groups = [
{value = "remote-tests", if = ["optional"]},
Expand Down
6 changes: 6 additions & 0 deletions src/zarr/codecs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from zarr.codecs.blosc import BloscCname, BloscCodec, BloscShuffle
from zarr.codecs.bytes import BytesCodec, Endian
from zarr.codecs.cast_value import CastValue
from zarr.codecs.crc32c_ import Crc32cCodec
from zarr.codecs.gzip import GzipCodec
from zarr.codecs.numcodecs import (
Expand All @@ -27,6 +28,7 @@
Zlib,
Zstd,
)
from zarr.codecs.scale_offset import ScaleOffset
from zarr.codecs.sharding import ShardingCodec, ShardingCodecIndexLocation
from zarr.codecs.transpose import TransposeCodec
from zarr.codecs.vlen_utf8 import VLenBytesCodec, VLenUTF8Codec
Expand All @@ -38,9 +40,11 @@
"BloscCodec",
"BloscShuffle",
"BytesCodec",
"CastValue",
"Crc32cCodec",
"Endian",
"GzipCodec",
"ScaleOffset",
"ShardingCodec",
"ShardingCodecIndexLocation",
"TransposeCodec",
Expand All @@ -50,12 +54,14 @@
]

register_codec("blosc", BloscCodec)
register_codec("cast_value", CastValue)
register_codec("bytes", BytesCodec)

# compatibility with earlier versions of ZEP1
register_codec("endian", BytesCodec)
register_codec("crc32c", Crc32cCodec)
register_codec("gzip", GzipCodec)
register_codec("scale_offset", ScaleOffset)
register_codec("sharding_indexed", ShardingCodec)
register_codec("zstd", ZstdCodec)
register_codec("vlen-utf8", VLenUTF8Codec)
Expand Down
Loading
Loading