diff options
Diffstat (limited to 'numpy/core/src/multiarraymodule.c')
-rw-r--r-- | numpy/core/src/multiarraymodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarraymodule.c index b03723e37..74f0c77ac 100644 --- a/numpy/core/src/multiarraymodule.c +++ b/numpy/core/src/multiarraymodule.c @@ -2164,12 +2164,12 @@ PyArray_CanCoerceScalar(int thistype, int neededtype, if (from->f->cancastscalarkindto && (castlist = from->f->cancastscalarkindto[scalar])) { while (*castlist != PyArray_NOTYPE) - if (*castlist++ == neededtype) { - Py_DECREF(from); - return 1; - } + if (*castlist++ == neededtype) { + Py_DECREF(from); + return 1; + } } - Py_DECREF(from); + Py_DECREF(from); switch(scalar) { case PyArray_BOOL_SCALAR: |