[Numpy-discussion] numpy: azip ?

Robert kxroberto at googlemail.com
Tue Nov 28 09:27:56 EST 2006


I often need a function to zip 2 (1D) arrays together to a 2D array - similar as python's zip() does. 
Found no function in numpy to do that directly without thinking a lot. Or is there one?
Otherwise such thing would be helpful in future numpy.

I have this in my tools:


def azip( *ll ):
    return numpy.vstack(ll).transpose()



Robert




More information about the NumPy-Discussion mailing list