[Numpy-discussion] Proposal of new function: iteraxis()
robert.kern at gmail.com
Fri Apr 26 07:33:49 EDT 2013
On Fri, Apr 26, 2013 at 12:26 PM, Andrew Giessel
<andrew_giessel at hms.harvard.edu> wrote:
> I agree with Charles that rollaxis() isn't immediately intuitive.
> 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
Docstrings are perfect places to briefly describe and demonstrate
common use cases for a function. There is no problem with including
the example that I wrote in the rollaxis() docstring.
In any case, whether you put the documentation in the rollaxis()
docstring or in one of the indexing/iteration sections, or
(preferably) both, I strongly encourage you to do that first and see
how it goes before adding a new alias.
More information about the NumPy-Discussion