axis of an array?" should be sufficiently
> > discoverable.
>
> Indeed, I agree that this is a documentation problem. It does not make it
> a simple problem.
>
> G
> ___
> NumPy-Discussion mailing list
> NumPy-Discussion@sci
> for s in slices(a, 2):
> ... print s.shape
> ...
> (2, 3, 5)
> (2, 3, 5)
> (2, 3, 5)
> (2, 3, 5)
>
>
> Or slightly with the slightly more complex:
>
> >>> len(list(slices(a, [2, -1])))
> 20
>
> Without focusing on my actual implementation, would
___
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
--
Andrew Giessel, PhD
Department of Neurobiology, Harvard Medical School
220 Longwood Ave Boston, MA 02115
ph: 617.432.7
precisely the kind of problem that documentation
> solves better than anything else. This is what we write documentation
> for. Let's make use of it before trying something else. If we add such
> a section, and still see many people not finding it, then we can
> consider adding a
space.
Generalizing this to iterate over multiple axes is something that might be
worthwhile, but the specifics of how to implement the axis ordering would
take some thought. I'm happy to discuss and tackle this if people are
really interested.
Hoping for some nice feedback,
ag
--
Andrew Gi
= np.ones((100,10,3))
for i in np.rollaxis(a, 2):
print i.shape
gives you 3 100x10 slices.
My PR is more of a pure iterator, so I sent it in
all the best,
ag
On Wed, Apr 17, 2013 at 2:18 PM, Andrew Giessel <
andrew_gies...@hms.harvard.edu> wrote:
> Chuck-
>
> Thank you for the v
experience so others can
have something to take a look at.
best+thanks,
ag
On Wed, Apr 17, 2013 at 11:43 AM, Charles R Harris <
charlesr.har...@gmail.com> wrote:
>
>
> On Wed, Apr 17, 2013 at 6:29 AM, andrew giessel
> wrote:
>
>> First, my apologies if this isn't
h last night was for essentially looping over
all elements of an array, one by one.
best,
Andrew
ps: please feel free to contribute to the gist!
--
Andrew Giessel, PhD
Department of Neurobiology, Harvard Medical School
220 Longwood Ave Boston, MA 02115
ph: 617.432.7971 email: andrew_gie