summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/src/multiarray/arrayobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c
index 10b750cdb..b559d4aba 100644
--- a/numpy/core/src/multiarray/arrayobject.c
+++ b/numpy/core/src/multiarray/arrayobject.c
@@ -1655,7 +1655,7 @@ array_alloc(PyTypeObject *type, Py_ssize_t NPY_UNUSED(nitems))
{
PyObject *obj;
/* nitems will always be 0 */
- obj = (PyObject *)PyArray_malloc(NPY_SIZEOF_PYARRAYOBJECT);
+ obj = (PyObject *)PyArray_malloc(type->tp_basicsize);
PyObject_Init(obj, type);
return obj;
}