[SciPy-user] inverse of column_stack

Stefan van der Walt stefan at sun.ac.za
Tue Feb 21 10:29:14 CST 2006


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):



More information about the SciPy-user mailing list