-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add support for Array API in NamedArray #8344
Draft
Illviljan
wants to merge
469
commits into
pydata:main
Choose a base branch
from
Illviljan:add_array_api_mean
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
Changes from 50 commits
Commits
Show all changes
469 commits
Select commit
Hold shift + click to select a range
d3f4c14
Update _manipulation_functions.py
Illviljan ac20d2c
add linalg
Illviljan b799a9f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c78031a
Add set functions
Illviljan b797472
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d6911a2
Update _creation_functions.py
Illviljan 91bb8fb
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan d9d23bb
Update __init__.py
Illviljan 69f3061
Update _sorting_functions.py
Illviljan 95c5bc4
Add fft
Illviljan 4e7dffb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 09e1478
Update __init__.py
Illviljan 9aca0cc
Update __init__.py
Illviljan a3f47a9
Update core.py
Illviljan 3cebb62
Update _creation_functions.py
Illviljan 042940b
Update _sorting_functions.py
Illviljan 26fb6cb
Update core.py
Illviljan 8e0af56
Update _utils.py
Illviljan 3341e93
Revert "Update _utils.py"
Illviljan dc862c5
Update namedarray_array_api_skips.txt
Illviljan 499bee9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2d5e81c
Update _linalg.py
Illviljan 3cee797
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 45abdfd
Update _indexing_functions.py
Illviljan d3efb66
Update _utils.py
Illviljan 7b8592a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 02b4f41
Update core.py
Illviljan 0470089
Update _utils.py
Illviljan 5ff5f66
Update _sorting_functions.py
Illviljan 3e1123b
fix linalg
Illviljan 7215680
Use stable repr
Illviljan 3c6e8c5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9d0b142
Update __init__.py
Illviljan d277ab1
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 0b2f21b
stricter
Illviljan d54210c
stricter
Illviljan 5622bd7
Update _elementwise_functions.py
Illviljan ee71d04
Update core.py
Illviljan ec55434
Update core.py
Illviljan 93bd9ca
more
Illviljan ec0e79c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1da91ea
Update _elementwise_functions.py
Illviljan bc4e69c
more
Illviljan dc37d5c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b1d7a59
Update _statistical_functions.py
Illviljan 48e5e9e
more
Illviljan 813396a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 94eb7b2
Update core.py
Illviljan 4a50a8a
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan ce8a60a
Update core.py
Illviljan bef1ead
Update core.py
Illviljan c13a8ae
Update _elementwise_functions.py
Illviljan e56e7cb
Update core.py
Illviljan acc4dc0
Simplify asarray
Illviljan 2466035
promote scalars correctly
Illviljan a06972b
Merge branch 'main' into add_array_api_mean
Illviljan 1dad0e3
fix
Illviljan a7b3a1c
all shapes less or equal than 1 are broadcastable
Illviljan 8ad9d1f
Update _elementwise_functions.py
Illviljan a6091eb
Update _elementwise_functions.py
Illviljan 9221751
simplify like functions
Illviljan 60aa969
Update _utils.py
Illviljan 451ac17
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] dc070d7
Update _creation_functions.py
Illviljan 29fb043
Update _creation_functions.py
Illviljan 9e36876
Update _utils.py
Illviljan 9b681c9
add typing
Illviljan e9649ef
remove atleast_0d
Illviljan ac1265e
use set instead, if len>1 something is odd is happening
Illviljan 407c8d6
Update _utils.py
Illviljan aab7b22
Update _elementwise_functions.py
Illviljan d82a7cc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f73e7a1
typing
Illviljan 43c81e3
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan bd083b2
Merge branch 'main' into add_array_api_mean
Illviljan b026b3c
Update _info.py
Illviljan 8d3f192
methods
Illviljan 221ba48
Update _manipulation_functions.py
Illviljan 157c46d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 26182d2
Update _fft.py
Illviljan 212dcdd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d31fe95
Update _linalg.py
Illviljan d05791c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5fccd5f
Update _typing.py
Illviljan 39fa648
Update _utils.py
Illviljan 7b80343
Merge branch 'main' into add_array_api_mean
Illviljan d37c44d
Make default unhashable
Illviljan beb3016
typing
Illviljan e993f3b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b86ee93
Update _typing.py
Illviljan 99426cb
Update _statistical_functions.py
Illviljan 18d5001
Create a truly non hashable default by subclassing list
Illviljan 4272a20
Update _utility_functions.py
Illviljan a6cf097
typing
Illviljan 4fa029b
Merge branch 'main' into add_array_api_mean
Illviljan b1ad54c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9657bf2
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 63db063
Update _typing.py
Illviljan e810921
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d9b516d
Update _creation_functions.py
Illviljan 686ef2b
Update _data_type_functions.py
Illviljan 937724d
Update _linear_algebra_functions.py
Illviljan 28dde6a
Update _set_functions.py
Illviljan 9354771
Update _typing.py
Illviljan ee12ae5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4de05f8
Using operators instead should handle inplace methods missing
Illviljan 0328e44
Update _indexing_functions.py
Illviljan 7f9c8bb
Update core.py
Illviljan 6014235
Update _utils.py
Illviljan 117548d
Update _utils.py
Illviljan 64278e5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 783be0d
Update _utils.py
Illviljan 652097b
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 5ce92c9
Update core.py
Illviljan 1ba871a
Merge branch 'main' into add_array_api_mean
Illviljan de99d36
skip cumulative sum
Illviljan 1835514
Update _typing.py
Illviljan 68c271c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 92ee203
Update _typing.py
Illviljan e70fee7
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 019a610
Update core.py
Illviljan 6e7de32
Update core.py
Illviljan c302e65
Update core.py
Illviljan ad6d7e4
Update _utils.py
Illviljan 8fa6d58
Update _manipulation_functions.py
Illviljan b65de7a
Update _manipulation_functions.py
Illviljan 0d0ea3b
normalize negative values to positive
Illviljan 52343d9
more tests and fixes to broadcasted dims
Illviljan 5e3da64
Add dims for basic array creation
Illviljan f45429d
add examples
Illviljan 7efcef2
add dim keywords
Illviljan 04b01b3
Update _manipulation_functions.py
Illviljan 4a97364
Add arithmetic broadcasting
Illviljan f4f3268
Use arithmetic broadcasting
Illviljan 656ab62
Add doctests
Illviljan 95f8490
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b9e6457
Merge branch 'main' into add_array_api_mean
Illviljan 9d4b9d2
Update _utils.py
Illviljan f64f967
reflexive should broadcast as well
Illviljan 5540702
typing
Illviljan b269650
Handle unordered dims
Illviljan 218eba1
Update _manipulation_functions.py
Illviljan 8ee6172
subclasses needs to be passed down
Illviljan 90e4819
prioritize variable arithmetics
Illviljan c295100
Update indexing.py
Illviljan d02f4f2
add copy to __array__
Illviljan 825805b
calculate dims from tuple indexing
Illviljan e29287d
Handle getitem better
Illviljan 28df307
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] eb73c2d
Update _utils.py
Illviljan a450e8a
Update core.py
Illviljan 30a4fea
Merge branch 'main' into add_array_api_mean
Illviljan 9c3f6c1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 73a7d2f
improve dims handling
Illviljan e947757
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 45c6db0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e90508e
typo
Illviljan 93933d6
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan de0aa20
Update _utils.py
Illviljan 17346f7
Update indexing.py
Illviljan 1173cc0
Update indexing.py
Illviljan 8a5a041
Update _manipulation_functions.py
Illviljan fae50aa
add examples
Illviljan 52f7edf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 805a0c5
Update _manipulation_functions.py
Illviljan 4621e26
Clarify the paths
Illviljan f6e90d0
Shorten name
Illviljan 31ef484
Add atleast1d for dims, unique_values seems to need it
Illviljan c049f98
unique_values is atleast1d
Illviljan 749235b
Update _manipulation_functions.py
Illviljan c77feb1
Update core.py
Illviljan fe17279
Merge branch 'main' into add_array_api_mean
Illviljan 00115d1
Update _set_functions.py
Illviljan 6cf9fae
Update _set_functions.py
Illviljan 18400d5
indexing are always 1d?
Illviljan 842b289
0D concatenation
Illviljan 733a45a
lets try reshape again
Illviljan b7ceeb4
Update _utils.py
Illviljan 43f757e
Ellipsis are often converted to slices
Illviljan e8b2b4e
Convert ellipsis to slices
Illviljan ec3880e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 4431175
Update _manipulation_functions.py
Illviljan a86d900
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 1267750
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5bafb8c
Try simplify mean
Illviljan 7c278dc
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan c59fb54
Seems successfull do it on the rest
Illviljan 889feaa
more places to simplify
Illviljan f6ffdaf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 793d166
squeeze
Illviljan 4ef9e1c
Merge branch 'add_array_api_mean' of https://github.com/Illviljan/xar…
Illviljan 353d8bf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0f26d51
Update _utils.py
Illviljan 2cec2c7
typing
Illviljan c5a3054
Update _utils.py
Illviljan e3923f4
matrix_transpose
Illviljan b8c4ba5
Merge branch 'main' into add_array_api_mean
Illviljan 31d8882
Update _linear_algebra_functions.py
Illviljan 0c83ff6
simplify function names
Illviljan 27ebb03
vecdot
Illviljan 0022d04
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b7d734a
Use normal repr
Illviljan 1891a6c
Normal repr
Illviljan e77d38d
Merge branch 'main' into add_array_api_mean
Illviljan 26de5e4
Update _statistical_functions.py
Illviljan 5496da9
Update _linear_algebra_functions.py
Illviljan 6499fb7
Update _set_functions.py
Illviljan 4dba4bf
flip
Illviljan 930c485
moveaxis
Illviljan 2a83e70
repeat
Illviljan ef2843c
Update _manipulation_functions.py
Illviljan 649118a
Update _manipulation_functions.py
Illviljan d7adbd8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e88af20
roll
Illviljan 557f654
Update _utils.py
Illviljan 8c1c970
Update _utils.py
Illviljan 19e1923
arange
Illviljan 1844721
asarray
Illviljan 22ed956
asarray
Illviljan 02c1aa7
empty
Illviljan 5f293b0
empty_like
Illviljan 2e89630
eye
Illviljan e94ed05
Update _creation_functions.py
Illviljan 468c90d
from_dlpack
Illviljan 38b0c4b
full
Illviljan 4163297
Update _creation_functions.py
Illviljan bbac8eb
full_like
Illviljan bab4856
linspace
Illviljan f01159c
Merge branch 'main' into add_array_api_mean
Illviljan 20498ff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 3a0941c
meshgrid
Illviljan 11e02c4
ones
Illviljan 14108e2
ones_like
Illviljan ce633a8
tril
Illviljan 8307e3e
triu
Illviljan 69bd690
zeros
Illviljan b24d3b5
zeros_like
Illviljan d8a955f
Merge branch 'main' into add_array_api_mean
Illviljan 0856ccb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7ae8e68
Update core.py
Illviljan e8131ce
Update _utils.py
Illviljan 437b3e0
all
Illviljan 38cff61
any
Illviljan f7e870c
diff
Illviljan 7d9918c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] befb4fe
Merge branch 'main' into add_array_api_mean
Illviljan 05c2b78
handle 0 dim arrays in meshgrid
Illviljan 1fdcea4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ceb2b87
Merge branch 'main' into add_array_api_mean
Illviljan ad46646
Merge branch 'main' into add_array_api_mean
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 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 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 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.
@Illviljan, i'm curious to hear your thoughts on adopting a similar structure/organization as that used in Numpy so as to it easier to incorporate new array API compliant functionality in the future. the new structure would group functionality under
/namedarray/_array_api/*.py
instead of of putting everything in_array_api.py
.e.g.
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.
Sure! I just thought it was too few functions to bother with it right now.
Cubed has similar structure too.
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.
perfect! i intend to add a few more functions to the
array_api
and i'm happy to put this structure in place