feat(indexing): make LazyArray indexing lazy by default - #4350
Draft
d-v-b wants to merge 38 commits into
Draft
Conversation
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Correct mathematical API documentation to match supported coordinate, grid, and chunk projection contracts. Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Retain the existing unsigned selector fix and update the unsupported mixed-dependency error assertion for general intersection routing. Assisted-by: Codex:GPT-6
…oundaries Assisted-by: Codex:GPT-6
Use lexicographic tuple grouping when chunk indices contain negative values. Cover shared one-axis and two-axis array dependencies, repeated points, and extreme signed coordinates. Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Add synchronous writes through composed selections and an explicit eager adapter for array consumers. Cover deferred reads, source mutation, masks, aliases, and repeated destinations. Assisted-by: Codex:GPT-6
The prerequisite runtime fixes are already present via the tested integration commits. Preserve the lazy-default revision while recording current prerequisite heads and their numbered changelogs. Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Documentation build overview
24 files changed ·
|
Remove implementation history and unsupported historical claims from source and test docstrings. Distinguish immutable coordinate mappings from mutable source values. Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
The prerequisite runtime changes and the shared docstring correction are already integrated and tested. Record the updated heads while preserving the revised LazyArray API. Assisted-by: Codex:GPT-6
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4350 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 92 92
Lines 12935 12935
=======================================
Hits 12203 12203
Misses 732 732 🚀 New features to boost your workflow:
|
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.
🤖 AI text below 🤖
LazyArraycurrently requires.lazyat each selection step; ordinary indexing materializes immediately. This revision makes the wrapper lazy by default:view[...][...],view.oindex[...], andview.vindex[...]return composed views, and iteration yields lazy first-axis views.result()and NumPy conversion materialize selected values.Adds synchronous
view.write(values)and assignment through the composed view. These update the original source, snapshot the RHS before mutation, and apply repeated destinations in C order with the last value winning. Affine writes use ascending basic slices; more general selections use scalar assignments. Writes are not transactional, and backend errors can leave partial writes. No asynchronous execution engine is introduced.A separate
EagerArrayAdaptersupplies eager indexing for consumers such as Dask'sfrom_array. Documentation, examples, and existing tests use the revised interface. This changes the experimentalzarr-indexingwrapper; it does not add or change azarr.Array.lazyaccessor or claim full NumPy advanced-indexing compatibility.Stack
Depends on #4345, #4346, #4347, #4348, and #4349. Their current heads are included in this branch. GitHub targets
mainbecause the prerequisite branches live in the fork; the full PR diff therefore includes those prerequisites. Rebase after they merge.Focused LazyArray implementation commit
Validation
zarr-indexingsuite, including doctests: 1,681 passed.