8000 update documentation · numpy/numpy@bfb325b · GitHub
[go: up one dir, main page]

Skip to content

Commit bfb325b

Browse files
committed
update documentation
1 parent f6df05a commit bfb325b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/source/reference/c-api/data_memory.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ functions may change during the lifetime of the process, each ``ndarray``
5555
carries with it the functions used at the time of its instantiation, and these
5656
will be used to reallocate or free the data memory of the instance.
5757

58+
For details see: :ref:`NEP 49 — Data allocation strategies <NEP49>`.
59+
5860
.. c:type:: PyDataMem_Handler
5961
6062
A struct to hold function pointers used to manipulate memory
@@ -87,6 +89,9 @@ will be used to reallocate or free the data memory of the instance.
8789
return ``NULL`` if an error has occurred. We wrap the user-provided functions
8890
so they will still call the python and numpy memory management callback
8991
hooks.
92+
The handlers are stored in a Python context variable
93+
(see https://docs.python.org/3/library/contextvars.html),
94+
so there can be multiple handlers in a Python session.
9095
9196
.. c:function:: PyObject * PyDataMem_GetHandler()
9297

0 commit comments

Comments
 (0)
0