File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,8 +88,11 @@ class FixedDimension:
8888@dataclass (frozen = True )
8989class VaryingDimension :
9090 """ Explicit per-chunk sizes. The last chunk may extend past the array
91- extent, in which case data_size clips to the valid region while
92- chunk_size returns the full edge length for codec processing."""
91+ extent (extent < sum(edges)), in which case data_size clips to the
92+ valid region while chunk_size returns the full edge length for codec
93+ processing. This underflow is allowed to match how regular grids
94+ handle boundary chunks, and to support shrinking an array without
95+ rewriting chunk edges (the spec allows trailing edges beyond the extent)."""
9396 edges: tuple[int , ... ] # per-chunk edge lengths (all > 0)
9497 cumulative: tuple[int , ... ] # prefix sums for O(log n) lookup
9598 extent: int # array dimension length (may be < sum(edges))
Original file line number Diff line number Diff line change @@ -125,8 +125,11 @@ def _size_repr(self) -> str:
125125@dataclass (frozen = True )
126126class VaryingDimension :
127127 """Explicit per-chunk sizes. The last chunk may extend past the array
128- extent, in which case ``data_size`` clips to the valid region while
129- ``chunk_size`` returns the full edge length for codec processing."""
128+ extent (``extent < sum(edges)``), in which case ``data_size`` clips to
129+ the valid region while ``chunk_size`` returns the full edge length for
130+ codec processing. This underflow is allowed to match how regular grids
131+ handle boundary chunks, and to support shrinking an array without
132+ rewriting chunk edges (the spec allows trailing edges beyond the extent)."""
130133
131134 edges : tuple [int , ...] # per-chunk edge lengths (all > 0)
132135 cumulative : tuple [int , ...] # prefix sums for O(log n) lookup
You can’t perform that action at this time.
0 commit comments