diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-05-22 13:33:13 -0500 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2020-05-22 14:17:50 -0500 |
commit | ce3d79a7c41e6be0a3ad0e8e3214f96fe29c77f9 (patch) | |
tree | f3741edb5459d6186889633bed75776fd6346ddf | |
parent | a9652077be95f83f56c9b77e7ad1ed7710516626 (diff) | |
download | numpy-ce3d79a7c41e6be0a3ad0e8e3214f96fe29c77f9.tar.gz |
BUG: Add missing dimensions free in `empty_like` with shape
-rw-r--r-- | numpy/core/src/multiarray/multiarraymodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c index 6915371d8..a9f673d93 100644 --- a/numpy/core/src/multiarray/multiarraymodule.c +++ b/numpy/core/src/multiarray/multiarraymodule.c @@ -1872,6 +1872,7 @@ array_empty_like(PyObject *NPY_UNUSED(ignored), PyObject *args, PyObject *kwds) /* steals the reference to dtype if it's not NULL */ ret = (PyArrayObject *)PyArray_NewLikeArrayWithShape(prototype, order, dtype, shape.len, shape.ptr, subok); + npy_free_cache_dim_obj(shape); if (!ret) { goto fail; } |