Im trying to iterate over a Numpy Array that contains 3d numpy arrays (3d vectors) inside it. Something like this:
import numpy as np
Matrix = np.zeros(shape=(10, 3))
# => [
[0,0,0],
[0,0,0],
...
[0,0,0]
]
I need to iterate over it, getting each 3d Vector. In pseudo code:
for vector in Matrix
print vector #=> [0,0,0]
Is there any Numpy native way of doing this? What is the fastest way of doing this?
Thanks!
Fran
np.zeros([3, 4, 5])would be a 3D array.