File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ Travis Vaught and Joe Cooper for administration of numpy.org web site and SVN
1414Eric Firing for bugfixes.
1515Arnd Baecker for 64-bit testing
1616David Cooke for many code improvements including the auto-generated C-API
17+ Alexander Belopolsky (sasha) for Masked array bug-fixes and tests...
Original file line number Diff line number Diff line change @@ -916,6 +916,8 @@ PyArray_Return(PyArrayObject *mp)
916916 return NULL ;
917917 }
918918
919+ if (!PyArray_Check (mp )) return (PyObject * )mp ;
920+
919921 if (mp -> nd == 0 ) {
920922 PyObject * ret ;
921923 ret = PyArray_ToScalar (mp -> data , mp );
@@ -6215,11 +6217,6 @@ PyArray_IterNew(PyObject *obj)
62156217 Py_INCREF (ao );
62166218 it -> ao = ao ;
62176219 it -> size = PyArray_SIZE (ao );
6218- if (it -> size == 0 ) {
6219- PyErr_SetString (PyExc_ValueError ,
6220- "Cannot iterate over a size-0 array" );
6221- return NULL ;
6222- }
62236220 it -> nd_m1 = nd - 1 ;
62246221 it -> factors [nd - 1 ] = 1 ;
62256222 for (i = 0 ; i < nd ; i ++ ) {
You can’t perform that action at this time.
0 commit comments