[Numpy-discussion] Can you enumerarte an array?
Chris Barker
Chris.Barker at noaa.gov
Sun Oct 9 21:38:25 EDT 2005
Hi all,
A freind of mine that I jsut introduced to NumPy asked me about
enumerating an array. What he'd like to see is something like:
A = N.ones((3,4))
for indexes, item in enumeate(A):
print indexes
result in:
(0,0)
(0,1)
(0,2)
(1,0)
.
.
.
You get the idea. Can you do this with any of the three NumPys? If not
consider this a feature request for scipy_base.
-Chris
More information about the NumPy-Discussion
mailing list