summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2021-05-06 14:06:59 +0300
committermattip <matti.picus@gmail.com>2021-05-06 14:30:10 +0300
commit6a673d0ae2c2ffac4c243240fbf237a5db648409 (patch)
tree90c21860c4e296a98d6af86d69659cb6da926932 /doc
parentc753b23e84a5474c39999fec1f2a6d1ccd54b9a3 (diff)
downloadnumpy-6a673d0ae2c2ffac4c243240fbf237a5db648409.tar.gz
NEP: add mailing list thread, fixes from review
Diffstat (limited to 'doc')
-rw-r--r--doc/neps/nep-0049.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/neps/nep-0049.rst b/doc/neps/nep-0049.rst
index 9adf0ff26..743dd2ad6 100644
--- a/doc/neps/nep-0049.rst
+++ b/doc/neps/nep-0049.rst
@@ -6,6 +6,7 @@ NEP 49 — Data allocation strategies
:Status: Draft
:Type: Standards Track
:Created: 2021-04-18
+:Resolution: http://numpy-discussion.10968.n7.nabble.com/NEP-49-Data-allocation-strategies-tt49185.html
Abstract
@@ -101,6 +102,11 @@ time of its instantiation, and these will be used to reallocate or free the
data memory of the instance. Internally NumPy may use ``memcpy`` or ``memset``
on the pointer to the data memory.
+The name of the handler will be exposed on the python level via a
+``numpy.core.multiarray.get_handler_name(arr)`` function. If called as
+``numpy.core.multiarray.get_handler_name()`` it will return the name of the
+global handler that will be used to allocate data for the next new `ndarrray`.
+
NumPy C-API functions
=====================
@@ -185,7 +191,7 @@ the ``sz`` argument is correct.
if (strncmp(real, "originally allocated", 20) != 0) {
fprintf(stdout, "uh-oh, unmatched shift_free, "
"no appropriate prefix\\n");
- /* Make gcc crash by calling free on the wrong address */
+ /* Make the C runtime crash by calling free on the wrong address */
free((char *)p + 10);
/* free(real); */
}
@@ -194,7 +200,7 @@ the ``sz`` argument is correct.
if (i != sz) {
fprintf(stderr, "uh-oh, unmatched "
"shift_free(ptr, %d) but allocated %d\\n", sz, i);
- /* Make gcc crash by calling free on the wrong address */
+ /* Make the C runtime crash by calling free on the wrong address */
/* free((char *)p + 10); */
free(real);
}