Currently ndarray does not offer a way of iterating over the elements of an n-dimensional array without writing code to explicitly deal with the dimensionality. It would be great to add such an iterator, even if it comes at the cost of some efficiency since it would allow e.g. standard STL algorithms to work on ndarrays.