From 4a2bf78b7002dfea2ac3e9060fcf779a70aabda5 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Thu, 23 Feb 2023 11:50:55 -0700 Subject: DOC: reword explanatory comment --- numpy/core/src/multiarray/ctors.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'numpy/core/src') diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index 79910ada8..a791dc35c 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -1086,16 +1086,11 @@ PyArray_NewLikeArrayWithShape(PyArrayObject *prototype, NPY_ORDER order, } } else { - // Currently we assume all non-legacy dtypes that have with the - // NPY_ITEM_REFCOUNT flag either represent heap-allocated dtypes or - // represent python objects. In the latter case the dtype is - // responsible for managing initialization and reference counts. In - // both cases initializing to NULL makes sense. - // - // In the future we might adjust this and have separate logic for - // new dtypes that hold heap-allocated data and new dtypes that hold - // python objects, particularly if we want to allow releasing the - // GIL in the former case. + // Currently we assume all non-legacy dtypes with the + // NPY_ITEM_REFCOUNT flag either hold heap-allocated data or hold + // python objects. In the latter case the dtype is responsible for + // managing initialization and reference counts. In both cases + // initializing to NULL makes sense. char *optr = PyArray_DATA((PyArrayObject*)ret); npy_intp n = PyArray_SIZE((PyArrayObject*)ret); for (npy_intp i = 0; i < n; i++) { -- cgit v1.2.1