PyArray MultiIterRESET void PyObject multi

Reset all the iterators to the beginning in a multi-iterator object, multi.

PyArray_MultiIter_NEXT (void) (PyObject* multi)

Advance each iterator in a multi-iterator object, multi, to its next (broadcasted) element.

PyArray_MultiIter_DATA (char*)(PyObj ect* multi, int i)

Return the data-pointer of the ith iterator in a multi-iterator object.

PyArray_MultiIter_NEXTi (void) (PyObject* multi, int i)

Advance the pointer of only the ith iterator.

PyArray_MultiIter_GOTO (void) (PyObject* multi, npy_intp* destination)

Advance each iterator in a multi-iterator object, multi, to the given N-dimensional destination where N is the number of dimensions in the broadcasted array.

PyArray_MultiIter_G0T01D (void) (PyObject* multi, npy.intp index)

Advance each iterator in a multi-iterator object, multi, to the corresponding location of the index into the flattened broadcasted array.

PyArray_Broadcast (int) (PyArrayMultilterObj ect* mit)

This function encapsulates the broadcasting rules. The mit container should already contain iterators for all the arrays that need to be broadcast. On return, these iterators will be adjusted so that iteration over each simultaneously will accomplish the broadcasting. A negative number is returned if an error occurs.

PyArray_RemoveSmallest (int) (PyArrayMultilterObj ect* mit)

This function takes a multi-iterator object that has been previously "broadcasted," finds the dimension with the smallest "sum of strides" in the broadcasted result and adapts all the iterators so as not to iterate over that dimension (by effectively making them of length-1 in that dimension). The corresponding dimension is returned unless mit->nd is 0, then -1 is returned. This function is useful for constructing ufunc-like routines that broadcast their inputs correctly and then call a strided 1-d version of the routine as the innerloop. This 1-d version is usually optimized for speed and for this reason the loop should be performed over the axis that won't require large stride jumps.

0 0

Post a comment