>>122
質問のニュアンスが良くわからないんだけど、こういうのか?
https://docs.scipy.org/doc/numpy/reference/generated/numpy.nditer.html