MCPcopy Create free account
hub / github.com/numpy/numpy / __next__

Method __next__

numpy/lib/index_tricks.py:600–612  ·  view source on GitHub ↗

Standard iterator method, returns the index tuple and array value. Returns ------- coords : tuple of ints The indices of the current iteration. val : scalar The array element of the current iteration.

(self)

Source from the content-addressed store, hash-verified

598 self.iter = np.asarray(arr).flat
599
600 def __next__(self):
601 """
602 Standard iterator method, returns the index tuple and array value.
603
604 Returns
605 -------
606 coords : tuple of ints
607 The indices of the current iteration.
608 val : scalar
609 The array element of the current iteration.
610
611 """
612 return self.iter.coords, next(self.iter)
613
614 def __iter__(self):
615 return self

Callers

nothing calls this directly

Calls 1

nextFunction · 0.50

Tested by

no test coverage detected