<div dir="ltr">I agree with Charles that rollaxis() isn't immediately intuitive.<div><br></div><div>It seems to me that documentation like this doesn't belong in rollaxis() but instead wherever people talk about indexing and/or iterating over an array.  Nothing about the iteration depends on rollaxis(),  rollaxis is just giving you a different view of the array to call __getitem__() on, if I understand correctly.</div>
<div><div><div><br></div><div style>I'm counting 2 for (Me, Charles), 2 against (Robert, Josef), and two or three neutral parties (based on interest/comments: Matthew, Sebastian, and Phil Elson (who commented on the PR)).  I don't know how to best proceed from here.</div>
<div><br></div></div></div><div style>Best,</div><div style><br></div><div style>Andrew</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 5:42 AM, Robert Kern <span dir="ltr"><<a href="mailto:robert.kern@gmail.com" target="_blank">robert.kern@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Apr 25, 2013 at 9:04 PM, Charles R Harris<br>
<<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>> wrote:<br>
<br>
> After thinking about it, I'm in favor of this small function. Rollaxis takes<br>
> a bit of thought and document reading to figure out how to use it, whereas<br>
> this function covers a common use with an easy to understand API.<br>
<br>
</div>It seems to me that just an additional example in the rollaxis()<br>
docstring solves that problem:<br>
<br>
  ``rollaxis()`` can be used to iterate over a given axis of a<br>
multidimensional array:<br>
<br>
    >>> for x in np.rollaxis(a, 2):<br>
    ...     print x.shape<br>
    ...<br>
    (3, 4, 6)<br>
    (3, 4, 6)<br>
    (3, 4, 6)<br>
    (3, 4, 6)<br>
    (3, 4, 6)<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Robert Kern<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Andrew Giessel, PhD<br><br>Department of Neurobiology, Harvard Medical School<br>220 Longwood Ave Boston, MA 02115<br>ph: 617.432.7971 email: <a href="mailto:andrew_giessel@hms.harvard.edu" target="_blank">andrew_giessel@hms.harvard.edu</a>
</div>