Iterating through a multidimensional array in Python August 11, 2023 by Tarik It’s clear you’re using numpy. With numpy you can just do: for cell in self.cells.flat: do_somethin(cell)