I\'m processing data by looping over vectors along an axis (could be any axis) of numpy ndarray (could be of any dimensions).
I didn\'t work on array directly becaus
Have you considered numpy.nditer?
See also Iterating over arrays.
EDIT: maybe another solution would just be to either use:
flatten
ravel
flat
You can thus iterate 1D-like whatever the array's initial dim, and then reshape the array to its original shape.
reshape