DOC: Listing of all numpy functions that support __array_function__
See original GitHub issueIs there a listing of all numpy functions one would need to wrap to fully support all of the API that is wrappable via __array_function__
? This seems like something that could be generated by introspection on the numpy source code and included in the numpy documentation, as far as I can see it doesn’t exist.
Having such a document to look at would make it much easier for downstream projects to add __array_function__
support. See https://github.com/yt-project/unyt/issues/139 for more details of my usage.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (12 by maintainers)
Top Results From Across the Web
numpy.array — NumPy v1.24 Manual
Reference object to allow the creation of arrays which are not NumPy arrays. If an array-like passed in as like supports the __array_function__...
Read more >NumPy quickstart — NumPy v1.24 Manual
It demonstrates how n-dimensional ( n >= 2 ) arrays are represented and can be manipulated. In particular, if you don't know how...
Read more >Mathematical functions — NumPy v1.24 Manual
Calculate the exponential of all elements in the input array. expm1 (x, /[, out, where, casting, order, ...]) Calculate exp(x) - 1 for...
Read more >NEP 18 — A dispatch mechanism for NumPy's high level array ...
We would like a protocol that allows arguments of a NumPy function to take control and divert execution to another function (for example...
Read more >numpy.ndarray — NumPy v1.24 Manual
Shape of created array. dtypedata-type, optional. Any object that can be interpreted as a numpy data type. bufferobject exposing ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I like
np.testing.overrides
. I’d suggest having both implementation-independent functions that allow one to check whether a function can be overridden (say,overrides.allows_array_ufunc_override
,overrides.allow_array_function_override
), and exposed sets of all functions that allow it (say,overrides.functions
andoverrides.ufuncs
).One question is how to make this discoverable. I guess with the documentation of
__array_ufunc__
and__array_function__
– maybe even add it to the relevant NEPs?@ngoldbaum We discussed your request at today’s triage meeting. The NumPy dev team would like to help downstream projects to add
__array_function__
support. What would be the best format to share the list of these functions with your project?