class_docstr: Flat iterator object to iterate over arrays.
  
  A flatiter iterator is returned by ``x.flat`` for any array ``x``. It
  allows iterating over the array as if it were a 1-D array, either in a
  for-loop or by calling its ``next`` method.
  
  Iteration is done in row-major, C-style order (the last index varying the
  fastest).
  
  Attributes:
      base (cupy.ndarray): A reference to the array that is iterated over.
  
  .. note::
     Restricted support of basic slicing is currently supplied. Advanced
     indexing is not supported yet.
  
  .. seealso:: :func:`numpy.flatiter`
class_docstr_tok: ["Flat","iterator","object","to","iterate","over","arrays",".","A","flatiter","iterator","is","returned","by","``","x.flat","``","for","any","array","``","x","``",".","It","allows","iterating","over","the","array","as","if","it","were","a","1-D","array",",","either","in","a","for-loop","or","by","calling","its","``","next","``","method",".","Iteration","is","done","in","row-major",",","C-style","order","(","the","last","index","varying","the","fastest",")",".","Attributes",":","base","(","cupy.ndarray",")",":","A","reference","to","the","array","that","is","iterated","over",".","..","note",":",":","Restricted","support","of","basic","slicing","is","currently","supplied",".","Advanced","indexing","is","not","supported","yet",".","..","seealso",":",":",":","func",":","`","numpy.flatiter","`"]
code: def __next__(self):
      index = self._index
      if index == len(self):
          raise StopIteration()
      self._index += 1
      return self[index]
  
file_path: cupy/cupy/_indexing/iterate.py
imports: import numpy
  import cupy
  from cupy import _core
  from cupy._core import internal
label_desc: Use image node_id 5 for calling the flatiter obj's underlying member method code with example usage: obj.__next__() and returns: self