diff options
| author | Nathan Goldbaum <nathan.goldbaum@gmail.com> | 2023-02-23 11:50:55 -0700 |
|---|---|---|
| committer | Nathan Goldbaum <nathan.goldbaum@gmail.com> | 2023-02-24 12:00:44 -0700 |
| commit | 4a2bf78b7002dfea2ac3e9060fcf779a70aabda5 (patch) | |
| tree | d2e2cbe5fd03e6f71281fd5d8577ced75c8b4902 /numpy | |
| parent | fd50e7f155d4c3313c71f60ab8af9bc4b2e6e354 (diff) | |
| download | numpy-4a2bf78b7002dfea2ac3e9060fcf779a70aabda5.tar.gz | |
DOC: reword explanatory comment
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/multiarray/ctors.c | 15 |
1 files changed, 5 insertions, 10 deletions
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++) { |
