define a chunked array protocol
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the issue's assumptions about abstract chunked arrays and the proposed chunked_array and async_chunked_array signatures. Compare the mentioned array and dlpack protocols and the Zarr array metadata model, then establish agreed synchronous and asynchronous protocol contracts. Done means the abstract representation and both protocol signatures are clearly specified.
Written by the indexing model from the issue text.
Description
dunders like __array__ and __dlpack__ are useful for extracting an array into a numpy array or a dlpack capsule. I'm not aware of a community-supported analog for extracting a chunked array into a chunked array container, like a dask array or a cubed array. This means we need to define an abstract chunked array, and then define a protocol that an implementation of that abstract chunked array would use to instantiate a real chunked array instance.
A few of my assumptions about the abstract chunked array:
- each chunk has the same data type
- the chunks are represented on a finite rectilinear grid (regular is a special case)
- each chunk decodes to the same in-memory array type(s)
- the grid of chunks must not be dense, so a fill value is required
As data, these assumptions are basically a subset of the Zarr array metadata document, with information about what in-memory array(s) the chunks decode into (e.g., which dunder methods does each decoded chunk define).
So if If we define __chunked_array__ and __async_chunked_array__ protocols for an object that decodes into an arbitrary chunked array, what should their signatures be? Something like __chunked_array__(self) -> Mapping[tuple[int, ...], Callable[[], ArrayLike]], i.e. it returns a mapping from chunk indices to functions that produce chunks? And for the async case, the callable would return a coroutine?
- Dominant language
- Python
- Stars
- 52
- Forks
- 3
- Avg merge
- 36m
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developmentseed/zarrista
-
Difficulty 4/5 3-5 days Newbie friendliness 54/100
developmentseed/zarrista#222 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
developmentseed/zarrista#211 · 1 comment ·
-
Bump to arrow 60Open
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
developmentseed/zarrista#203 ·
-
Read and write icechunk sessions through the zarr-python Store instead of linking the icechunk crateOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
developmentseed/zarrista#196 ·
-
pyemscripten wheel is unimportable: the Python layer imports async-only classes unconditionallyOpen
Difficulty 3/5 1-2 days Newbie friendliness 57/100
developmentseed/zarrista#189 · 3 comments ·
All issues in developmentseed/zarrista
Similar issues
-
Task select patterns with uppercase letters never matchPossibly taken @manobhisriram claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
app: scripts status: backlog type: housekeeping
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
netbox-community/netbox-scripts#239 ·
Maintainers usually reply within 1 day
-
Lambda deploys fail once the bundle grows by about 254 KBPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
developmentseed/titiler-cmr#341 ·
Maintainers usually reply within 1 day
-
Card tables add "..." to every value in a DataFrame column when any value is longer than 30 charactersPossibly taken @omkarbandikatte claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day