[Numpy-discussion] very simple iteration question.
a g
lmnop345 at gmail.com
Wed Apr 30 04:11:36 EDT 2008
Hi. This is a very basic question, sorry if it's irritating. If i
didn't find the answer written already somewhere on the site, please
point me to it. That'd be great.
OK: how do i iterate over an axis other than 0?
I have a 3D array of data[year, week, location]. I want to iterate
over each year at each location and run a series of stats on the
columns (on the 52 weeks in a particular year at a particular location).
'for years in data:' will get the first one, but then how do i not
iterate over the 1 axis and iterate over the 2 axis instead?
thanks,
alex.
More information about the NumPy-Discussion
mailing list