numpy  2.0.0
include/numpy/_neighborhood_iterator_imp.h File Reference

Go to the source code of this file.

Defines

#define _UPDATE_COORD_ITER(c)

Functions

static NPY_INLINE int _PyArrayNeighborhoodIter_IncrCoord (PyArrayNeighborhoodIterObject *iter)
static NPY_INLINE int _PyArrayNeighborhoodIter_IncrCoord2D (PyArrayNeighborhoodIterObject *iter)
static NPY_INLINE int PyArrayNeighborhoodIter_Next (PyArrayNeighborhoodIterObject *iter)
static NPY_INLINE int PyArrayNeighborhoodIter_Reset (PyArrayNeighborhoodIterObject *iter)

Define Documentation

#define _UPDATE_COORD_ITER (   c)
Value:
wb = iter->coordinates[c] < iter->bounds[c][1]; \
    if (wb) { \
        iter->coordinates[c] += 1; \
        return 0; \
    } \
    else { \
        iter->coordinates[c] = iter->bounds[c][0]; \
    }
Update to next item of the iterator
Note: this simply increment the coordinates vector, last dimension incremented first , i.e, for dimension 3 ... -1, -1, -1 -1, -1, 0 -1, -1, 1

System Message: ERROR/3 (<string>, line 9) Unexpected indentation.

<blockquote>

System Message: SEVERE/4 (<string>, line 9)
Unexpected section title or transition.

....

</blockquote>

System Message: WARNING/2 (<string>, line 10) Block quote ends without a blank line; unexpected unindent.
-1, 0, -1 -1, 0, 0

System Message: ERROR/3 (<string>, line 12) Unexpected indentation.

<blockquote>

System Message: SEVERE/4 (<string>, line 12)
Unexpected section title or transition.

....

</blockquote>

System Message: WARNING/2 (<string>, line 13) Block quote ends without a blank line; unexpected unindent.
0, -1, -1 0, -1, 0

System Message: ERROR/3 (<string>, line 15) Unexpected indentation.

<blockquote>

System Message: SEVERE/4 (<string>, line 15)
Unexpected section title or transition.

....

</blockquote>


Function Documentation

Version optimized for 2d arrays, manual loop unrolling
Advance to the next neighbour

Referenced by name().

Reset functions

Referenced by name().