Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed error handling for clarity

  • Loading branch information...
commit 13bc468898f6a97f9f8b7e2a410107123a034e4d 1 parent ca1373b
@jsalvatier authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 numpy/core/src/multiarray/mapping.c
View
8 numpy/core/src/multiarray/mapping.c
@@ -2038,10 +2038,12 @@ PyArray_MapIterArray(PyArrayObject * a, PyObject * index, int oned, int fancy)
{
PyArrayMapIterObject * mit;
mit = (PyArrayMapIterObject *) PyArray_MapIterNew(index, oned, fancy);
- if (mit != NULL) {
- PyArray_MapIterBind(mit, a);
- PyArray_MapIterReset(mit);
+ if (mit == NULL) {
+ return NULL;
}
+
+ PyArray_MapIterBind(mit, a);
+ PyArray_MapIterReset(mit);
return mit;
}
Please sign in to comment.
Something went wrong with that request. Please try again.