-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Tracking issue: Add array API standard support to the main namespace #25076
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
Comments
This mailing list thread goes into details for some of the "easy and useful" changes https://mail.python.org/archives/list/numpy-discussion@python.org/thread/TTZEUKXUICDHGTCX5EMR6DQTYOSDGRV7/#YKBWQ2AP76WYWAP6GFRYMPHZCKTC43KM |
I would be very happy to hear any opinion here around adding aliases for functions or kwargs that do the exact same thing as existing ones. I don't dislike at least most of them. |
It looks to me like that would require adding a whole new hidden namespace, rather then a simple |
Hi! I'm finalizing the last # Note: vecdot is not in NumPy
def vecdot(x1: Array, x2: Array, /, *, axis: int = -1) -> Array: there's |
|
We discussed this topic in the community meeting two days ago. Quick summary:
|
also, |
Another TODO to add here: I'm interested in what choice NumPy will make regarding the treatment of |
Good question. Whether >>> x = np.asarray([1.0, 2.0, np.nan, 3.0, 4.0, np.nan, 5.0])
>>> np.sort(x)
array([ 1., 2., 3., 4., 5., nan, nan])
>>> np.sort(x)[::-1]
array([nan, nan, 5., 4., 3., 2., 1.]) |
Great, thanks! That's exactly how I ended up implementing it here: jax-ml/jax#19201 |
For NumPy 2.0. xref numpygh-25076 as the main tracking issue for this topic. [skip actions] [skip azp] [skip cirrus]
* NEP: add NEP 56 on array API standard support in main namespace For NumPy 2.0. xref gh-25076 as the main tracking issue for this topic. [skip actions] [skip azp] [skip cirrus] * DOC: rework for review comments: textual suggestions and easy changes [skip actions] [skip cirrus] [skip azp] * DOC: second batch of smaller textual changes [skip actions] [skip azp] [skip cirrus] * DOC: adopt suggestions on namespace and alias count/hiding [skip actions] [skip cirrus] [skip azp] * DOC: extend abstract with the main rationale and benefits * add section about which parts of the standard are not adopted [skip actions] [skip azp] [skip cirrus] * Add the in-place "no unsafe casting" item to the not adopted section Also a few smaller textual changes. [skip actions] [skip cirrus] [skip azp] * NEP: update content mentioning array scalars Addresses review feedback. Array scalars aren't actually incompatible with the design of the standard. * NEP: improve backwards compatibility section and describe `copy=` better As requested in PR review, better delineate the different types of changes in the backwards compatibility section, and add assessments of what the impact of changes is. In addition, expect the description of the `copy=` keyword semantics changes. [skip cirrus] [skip actions] [skip azp] * NEP: update description of `fft` changes [skip actions] [skip cirrus] [skip azp]
This is all done, so let's close this tracking issue. Thanks all! |
@rgommers Re: #25076 (comment), was closing this without |
Yes, intentional to close this tracking issue as "declaring victory for 2.0.0". For several of the loose ends we decided that individual issues could be used - tracking issues shouldn't stay open indefinitely. IIRC |
shall we open a new issue to track it? Or are there other array API standard compatibility things tracked somewhere? |
Please use gh-14728 for this I'm not in favor of a permanent array API compatibility issue if that's what you meant, it'd be better to use the existing label for it. |
See the slides from the NumPy 2.0 developer meeting in the numpy archive for an initial overview. That content has to be expanded into a NEP.
Backlog
Infra/support/docs
array-api-tests
CI stage, addndarray.__array_namespace__
#25167)a user guide documentation pagemain namespace
np.bool
(API: Add and redefinenumpy.bool
[Array API] #25080)np.astype
(API: Introducenp.astype
[Array API] #25079)unique_all
,unique_counts
,unique_inverse
,unique_values
(API: Add Array API setops [Array API] #25088)concat
,permute_dims
(API: Add Array API aliases (math, bitwise, linalg, misc) [Array API] #25086)bitwise_left_shift
,bitwise_right_shift
,bitwise_invert
(API: Add Array API aliases (math, bitwise, linalg, misc) [Array API] #25086)copy
keyword argument fornp.asarray
(API: Introducecopy
argument fornp.asarray
[Array API] #25168)linalg
namespacecross
tonumpy.linalg
[Array API] #25145)matrix_norm
,vector_norm
,vecdot
andmatrix_transpose
[Array API] #25155)matrix_norm
,vector_norm
,vecdot and
)matrix_transpose
[Array API] #25155outer
tonumpy.linalg
[Array API] #25101)svdvals
tonumpy.linalg
[Array API] #24940)matrix_norm
,vector_norm
,vecdot
andmatrix_transpose
[Array API] #25155)matrix_norm
,vector_norm
,vecdot
andmatrix_transpose
[Array API] #25155)ndarray
methods and attributes__array_namespace__
method (MAINT: Addarray-api-tests
CI stage, addndarray.__array_namespace__
#25167)to_device
anddevice
members (API: Adddevice
andto_device
tonumpy.ndarray
[Array API] #25233)miscellaneous
correction
argument forvar
andstd
(API: Introducecorrection
argument fornp.var
andnp.std
[Array API] #25169)rtol
parameter forpinv
andupper
parameter forcholesky
(API: Adjustlinalg.pinv
andlinalg.cholesky
to Array API #25388)The text was updated successfully, but these errors were encountered: