-
-
Notifications
You must be signed in to change notification settings - Fork 364
Feature: support rectilinear chunk grid extension #3534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature: support rectilinear chunk grid extension #3534
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3534 +/- ##
==========================================
+ Coverage 61.86% 62.20% +0.33%
==========================================
Files 85 85
Lines 10111 10522 +411
==========================================
+ Hits 6255 6545 +290
- Misses 3856 3977 +121
🚀 New features to boost your workflow:
|
…ature/rectilinear-chunk-grid
when you need to align chunks with existing data partitions. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when you need to align chunks with existing data partitions. | |
when you need to align chunks with existing data partitions. | |
The specification for this chunking scheme can be found [here](https://github.com/zarr-developers/zarr-extensions/tree/main/chunk-grids/rectilinear/). |
This link doesn't resolve yet but it will when the spec is merged.
With variable chunking, the standard `.chunks` property is not available since chunks | ||
have different sizes. Instead, access chunk information through the chunk grid: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better if .chunks
just had a different type (tuple of tuples of ints)
|
||
|
||
@dataclass(frozen=True) | ||
class RectilinearChunkGrid(ChunkGrid): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thoughts on just calling this class Rectilinear
, and renaming the RegularChunkGrid
to Regular
? We could keep around a RegularChunkGrid
class for compatibility. But I feel like people know these are chunk grids when they import them
) | ||
|
||
@cached_property | ||
def _cumulative_sizes(self) -> tuple[tuple[int, ...], ...]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, this is cached
(Marking this as a draft for now)
closes: #1595
replaces: #1483
xref: zarr-developers/zarr-extensions#25
TODO:
docs/user-guide/*.md
changes/