diff options
| -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++) { |
