Feb. 21, 2006
4:29 p.m.
You can always do def rows(A): nr_rows = x.shape[0] for r in range(nr_rows): yield A[r,:] for r in rows(A): print r Cheers Stéfan On Tue, Feb 21, 2006 at 10:11:18AM -0500, Ryan Krauss wrote:
I think we misunderstood one another. I want to iterate over the columns of a matrix I already have. This does what I want, I just wondered if there was one built-in function that does this (or if tolist could have an axis argument):