On Thu, Apr 25, 2013 at 9:04 PM, Charles R Harris
<[email protected]> wrote:

> After thinking about it, I'm in favor of this small function. Rollaxis takes
> a bit of thought and document reading to figure out how to use it, whereas
> this function covers a common use with an easy to understand API.

It seems to me that just an additional example in the rollaxis()
docstring solves that problem:

  ``rollaxis()`` can be used to iterate over a given axis of a
multidimensional array:

    >>> for x in np.rollaxis(a, 2):
    ...     print x.shape
    ...
    (3, 4, 6)
    (3, 4, 6)
    (3, 4, 6)
    (3, 4, 6)
    (3, 4, 6)

--
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to