### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Indexing routines »

# numpy.ndenumerate

class `numpy.``ndenumerate`(arr)

  Multidimensional index iterator.

  Return an iterator yielding pairs of array coordinates and values.

  Parameters: | a : ndarray Input array.

  Examples

      >>> a = np.array([[1,2],[3,4]])
      >>> for index, x in np.ndenumerate(a):
      ...     print index, x
      (0, 0) 1
      (0, 1) 2
      (1, 0) 3
      (1, 1) 4

### Navigation

- index
- modules |
- next |
- previous |
- NumPy v1.3 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Indexing routines »