summaryrefslogtreecommitdiff
path: root/doc/neps/nep-0018-array-function-protocol.rst
Commit message (Collapse)AuthorAgeFilesLines
* DOC: Fix typos in NEPs, found by codespellDimitri Papadopoulos2021-09-221-2/+2
|
* DOC: Add a NEP link to all neps.Matthias Bussonnier2020-05-301-0/+2
| | | | | | | | | | | | | | | | | | | Usefull for crossreferencing and intersphinx Here is a snippet to update it if other neps are missing it: In [1]: neps = !ls nep-0* ...: for nep in neps: ...: number = nep[6:8] ...: with open(nep, 'r') as f: ...: data = f.read() ...: ...: if f'.. _NEP{number}:' in data: ...: continue ...: with open(nep, 'w') as f: ...: f.write('.. _NEP'+number+':\n') ...: f.write(data) ...:
* DOC: change NEP 18 status to FinalRalf Gommers2020-05-291-1/+1
|
* Fix typoMin ho Kim2019-06-231-1/+1
|
* DOC: caution against relying upon NumPy's implementation in subclassesStephan Hoyer2019-05-261-4/+12
| | | | | | | | | | | I think this is an important warning to include for subclass authors. Otherwise, we will be expanding our exposure of internal APIs as part of ``__array_function__``. All things being equal, it's great when things "just work" subclasses, but I don't want to guarantee it. In particular, I would be very displeased if ``__array_function__`` leads to NumPy adding more subclass specific hacks like always calling ``mean()`` inside ``median()`` (GH-3846). mhvk: please take a look.
* DOC: note support for NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=0Stephan Hoyer2019-05-251-6/+9
|
* DOC: revert __skip_array_function__ from NEP-18Stephan Hoyer2019-05-251-166/+79
| | | | | | | | | This reverts most of the changes from GH-13305, and adds a brief discussion of ``__skip_array_function__`` into the "Alternatives" section. We still use NumPy's implementation of the function internally inside ``ndarray.__array_function__``, but I've given it a new name in the NEP (``_implementation``) to indicate that it's a private API.
* Clarify why we allow subclasses in ndarray.__array_function__Stephan Hoyer2019-05-111-6/+15
|
* Rename __numpy_implementation__ -> __skip_array_function__Stephan Hoyer2019-05-101-32/+52
|
* Add clarification and fixes per PR discussionStephan Hoyer2019-04-141-21/+84
|
* NEP: Update NEP-18 to include the __numpy_implementation__ attribute.Stephan Hoyer2019-04-111-118/+169
| | | | | | | | | | | Fix GH12974 This includes two minor changes to NEP-18 that will need to be implemented in NumPy: - The ``__numpy_implementation__`` attribute is documented and officially supported as a way to defer to NumPy's own implementation. - I have noted that dispatcher functions should be given the same name as implementations, which should result in more interprettable error messages.
* ENH: refactor __array_function__ pure Python implementationStephan Hoyer2018-12-191-8/+8
|
* Merge pull request #12362 from shoyer/disable-array-function-by-defaultCharles Harris2018-11-121-0/+9
|\ | | | | MAINT: disable `__array_function__` dispatch unless environment variable set
| * MAINT: disable __array_function__ dispatch unless environment variable setStephan Hoyer2018-11-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Per discussion on the mailing list, __array_function__ isn't quite ready to release as part of NumPy 1.16: https://mail.python.org/pipermail/numpy-discussion/2018-November/078949.html We'd like to improve performance a bit, and it will be easier to support introspection on NumPy functions if we support Python 3 only. So for now, you need to set the environment variable ``NUMPY_EXPERIMENTAL_ARRAY_FUNCTION=1`` to enable dispatching.
* | NEP: clarify the purpose of "types" in __array_function__Stephan Hoyer2018-11-101-2/+3
|/ | | | | Per our discussion on the mailing list: https://mail.python.org/pipermail/numpy-discussion/2018-November/078911.html
* NEP: Add "Provisional" status and move nep 18 to provisionalmattip2018-10-161-1/+1
|
* MAINT: minor adjustment to nep-18Stephan Hoyer2018-10-151-2/+3
|
* NEP: add notes about updates to NEP-18Stephan Hoyer2018-10-141-1/+6
| | | | As discussion in GH12140
* DOC: fixups for NEP-18 based on the implementationStephan Hoyer2018-10-101-28/+25
| | | | | | | The main change is replacing `try_array_function_override` with `array_function_implementation_or_override` (our current implementation). I also fixed a few typos.
* Revert "NEP: Revert "NEP: Mark NEP 18 as accepted""Stephan Hoyer2018-09-201-1/+2
|
* DOC: switch order of checking for new protoclsStephan Hoyer2018-09-131-5/+5
|
* DOC: Add warning/clarification about backwards compat in NEP-18Stephan Hoyer2018-09-131-13/+41
| | | | | Per mailing list discussion in: https://mail.python.org/pipermail/numpy-discussion/2018-August/078493.html
* Revert "NEP: Mark NEP 18 as accepted"revert-11693-accept-nep18Stephan Hoyer2018-09-121-2/+1
|
* Mark NEP 18 as acceptedStephan Hoyer2018-08-081-1/+2
| | | We should wait to merge this until Nathaniel's has had the chance to read it.
* Rename to callable objects generated at runtimeStephan Hoyer2018-07-271-13/+16
|
* DOC: add a brief note on "Protocols for methods" to NEP 18Stephan Hoyer2018-07-251-4/+22
|
* DOC: include NEP number on each NEP pageStephan Hoyer2018-07-011-3/+3
|
* DOC: additional revision for NEP-18 (__array_function__) (#11374)Stephan Hoyer2018-06-271-149/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: additional revisions for NEP-18 (__array_function__) * Rename: @dispatch -> @array_function_dispatch * Clarify the possibility of a limited core API * Update magic decorators; add other protocol choices * Add section on extensibility * another sentence * Move implementation specific arguments to Alternatives * Add discussion links * Note on return value/types and typing * Add note about why we write issubclass(t, MyArray) * Spelling and minor rewording * Add Marten, Hameer and Eric as co-authors
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-1/+1
|
* Add warning about rewriting to use a decoratorStephan Hoyer2018-06-151-0/+5
|
* Revisions per GitHub discussionStephan Hoyer2018-06-121-79/+77
|
* DOC: revision of NEP-18 (__array_function__)Stephan Hoyer2018-06-111-96/+169
| | | | | | | | | | | | | | | | | I would particularly like to highlight a draft implementation (in pure Python for now). Hopefuly this will be a useful for driving the discussion forward: https://nbviewer.jupyter.org/gist/shoyer/1f0a308a06cd96df20879a1ddb8f0006 TODOs before merging: - [ ] review from mrocklin Other TODOs: - [ ] decide if we want to change what is passed on to `__array_function__` implementations: should we include `overloaded_args` and/or `relevant_args` as well or instead? - [ ] add some discussion about static typing / PEP-484?
* NEP: add 'rst' to nep filename, fixup urlsmattip2018-06-011-0/+543