Is there function to get an iterator over an arbitrary dimension of a numpy array?
Iterating over the first dimension is easy...
In [63]: c = numpy.a
I guess there is no function. When I wrote my function, I ended up taking the iteration EOL also suggested. For future readers, here it is:
def iterdim(a, axis=0) : a = numpy.asarray(a); leading_indices = (slice(None),)*axis for i in xrange(a.shape[axis]) : yield a[leading_indices+(i,)]