-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Type chunkmanagers #9227
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
Draft
Illviljan
wants to merge
61
commits into
pydata:main
Choose a base branch
from
Illviljan:namedarray_chunkmanager
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Type chunkmanagers #9227
Changes from 19 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
3fdb52f
Type parallelcompat
Illviljan c24b7ae
Type daskmanager
Illviljan a932c71
Add chunks typing
Illviljan 676f045
Update times.py
Illviljan 6f79bdc
Update times.py
Illviljan 3d48d44
Update _typing.py
Illviljan e7041e0
Update test_parallelcompat.py
Illviljan 6f56dd8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 19b2674
Update indexing.py
Illviljan 11aa840
Update core.py
Illviljan 62635eb
Update variable.py
Illviljan 9c996a8
Update computation.py
Illviljan 6625874
Merge branch 'namedarray_chunkmanager' of https://github.com/Illvilja…
Illviljan 81fcf85
Update variables.py
Illviljan c894c7b
Update dataset.py
Illviljan fe35554
Update _typing.py
Illviljan bc05489
Update parallelcompat.py
Illviljan cedff32
Update parallelcompat.py
Illviljan d43c0c1
Update test_coding_times.py
Illviljan 6530440
Merge branch 'main' into namedarray_chunkmanager
Illviljan 2f1a6ca
Merge branch 'main' into namedarray_chunkmanager
Illviljan d5d3e35
Merge branch 'main' into namedarray_chunkmanager
max-sixty 116c920
Merge branch 'main' into namedarray_chunkmanager
Illviljan 6399dab
Update _typing.py
Illviljan 156a953
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6a08740
Update times.py
Illviljan daba54e
Merge branch 'namedarray_chunkmanager' of https://github.com/Illvilja…
Illviljan eef8fc8
Update core.py
Illviljan db98984
Update daskmanager.py
Illviljan 96e1a1d
Update test_coding_times.py
Illviljan bf83275
Update test_coding_times.py
Illviljan 31e1895
test pd.index
Illviljan 30f8cdd
Update test_namedarray.py
Illviljan 6ed1ae6
Update test_namedarray.py
Illviljan cd05c67
Add more helpful error
Illviljan 459378f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7bc2c31
Merge branch 'main' into namedarray_chunkmanager
Illviljan 389aca7
Merge branch 'main' into namedarray_chunkmanager
Illviljan 254a6b3
Merge branch 'main' into namedarray_chunkmanager
Illviljan 85f49eb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7ab9fda
Merge branch 'main' into namedarray_chunkmanager
Illviljan 1b791b7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7632f3f
Update core.py
Illviljan ac3102e
Merge branch 'namedarray_chunkmanager' of https://github.com/Illvilja…
Illviljan 340b70f
Update daskmanager.py
Illviljan 52aacfe
Update parallelcompat.py
Illviljan ebf415d
chunkedduckarray
Illviljan 02e7b28
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e71a36a
Update datatree.py
Illviljan aa214e4
Merge branch 'namedarray_chunkmanager' of https://github.com/Illvilja…
Illviljan d7da450
Update times.py
Illviljan df29319
Update times.py
Illviljan 6735cf0
Update times.py
Illviljan feaed2c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9d0c480
Update times.py
Illviljan 3e6b5dd
add __array___ test
Illviljan fd891e9
Update test_namedarray.py
Illviljan 76d9de6
Merge branch 'namedarray_chunkmanager' of https://github.com/Illvilja…
Illviljan fa148fa
Merge branch 'main' into namedarray_chunkmanager
Illviljan 82e5f58
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a4b4e7e
Merge branch 'main' into namedarray_chunkmanager
Illviljan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
You should still use TypeVars and not the protocol directly.
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 don't think that works (yet, waiting on Higher-Kinded TypeVars). Using
T_DuckArray
will indeed retain thenp.ndarray
typing (good) but also thedtype
andshape
typing (bad/wrong).We don't really care (in theory) if it is ndarray or cupy array, just that they pass the minimal requirements for a
duckarray
. But we do care thatdtype
andshape
is correct after calculation.duckarray
is actuallyduckarray[_ShapeType, _DType]
where the dtype and shape are TypeVars, in same fashion as numpy see #8294. I am intentionally lazy with this in non-namedarray files though to avoid the PRs touching every file.