[Numpy-discussion] numpy: azip ?

Torgil Svensson torgil.svensson at gmail.com
Tue Nov 28 14:22:35 CST 2006


or if you want to stack array with more dimensions

concatenate((a[...,newaxis],b[...,newaxis]),axis=-1)


On 11/28/06, Robert Kern <robert.kern at gmail.com> wrote:
> Robert wrote:
> > 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.
>
> column_stack()
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
>  that is made terrible by our own mad attempt to interpret it as though it had
>  an underlying truth."
>   -- Umberto Eco
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>


More information about the Numpy-discussion mailing list