Repository navigation
ZEP 12: bounds as an alternative to shape, origin on the regular grid - #400
Draft
rhoadesScholar wants to merge 5 commits into
Draft
rhoadesScholar wants to merge 5 commits into
rhoadesScholar wants to merge 5 commits into
Conversation
Array metadata may give `bounds` (a half-open coordinate range per dimension) in place of `shape`; the regular chunk grid gains an optional `origin`, permitted only with `bounds`, and grid indices may be negative. The default and v2 chunk key encodings write a negative index with a leading `-` and reject `-0`.
Core: version 3.2 and ZEP0012 in the header to match the change log and the sub-specifications; the `shape` entry points at `bounds` instead of restating the exactly-one rule; writers omit `origin` when they revert to `shape`; the example no longer carries a zero `origin`; link the two remaining uses of "bounds" to its definition. Regular grid: `origin` MUST NOT be present without `bounds` and readers MUST refuse `shape` with `origin`; the fill-value recommendation for positions outside the bounds moves from the note into the body as a SHOULD; "position" for the within-chunk offset throughout; the example table's column is the array extent and notes both overhangs. v2 encoding: the key-ordering note the default encoding already has.
This was referenced Oct 22, 2026
Regular grid: a version 1.0 implementation may accept and ignore `origin` rather than being said to always do so; "position" in the shape worked example too. Core: reword the Mandatory lead-in so the exactly-one rule reads as a sentence.
Follows the ZEP text (zeps#72 review): the two arrays have the same length and inclusive_min[i] <= exclusive_max[i]; the zero-dimensional form is given. Examples and the regular grid's resizing text updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec text for ZEP 12 (zarr-developers/zeps#72): explicit array bounds. Discussion: zarr-developers/zarr-extensions#79.
boundsas an alternative toshape(exactly one present), the derived shape, a worked example with negative chunk keys, a note under resizing, a 3.2 change log entry.origin, permitted only withbounds; negative grid indices; the grid extent and element formulas in terms of the origin; the first chunk may be partial as the last already may be.defaultandv2chunk key encodings (1.1): a negative index is written with a leading-;-0is never written and is rejected on parse; a note on key ordering.sphinx -Wpasses except for the two pre-existingstorage_transformersduplicate-target errors thatmainhas too.