Numpy: Iterating Arrays Using nditer()

In Numpy, there is a package numpy.nditer to iterate each element of Numpy array. It is a multi-dimensional iterator. Basically, It can be used from basic to advanced iterations. It also solves some basic issues.

Example:

import numpy as np
array_0 = np.array([[['a','b','c'], ['d','e','f']],[[1,2,3],[4,5,6]]])
for x in np.nditer(array_0):
    print(x)

Output:

a
b
c
d
e
f
1
2
3
4
5
6