Skip to content

Zarr JPEG-XL encoder squeezes chunks dimension #145

Description

@JeppeKlitgaard

Once again, thank you for putting together this very useful library!

I am running into a problem/inconsistency using the Jpegxl codec for Zarr where the number of dimensions of the array passed to the underlying JXL encoder changes based on the chunk shape.

Concretely, I have an array of shape (100, 2000, 2000) where the first axis is understood to be bands/channels, while the latter two make up a 2D image. For this, I would want to specify the planar=True argument. This works well, except when chunking with a shape (1, ..., ...), in which case the array gets squeezed via this line into 2D, which causes the dimensionality check in these lines to fail.

I am wondering if this is the intended behaviour, or whether this is inadvertent? The consequence is that the encoder breaks when changing from chunking (2, ..., ...) to (1, ..., ...), which seems like a bit of a sharp edge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions