[SciPy-user] concatenating arrays of different dimensions

Pierre GM pgmdevlist@gmail....
Mon Feb 2 02:23:26 CST 2009


On Feb 2, 2009, at 3:12 AM, bgbg bg wrote:

> Hello,
> Consider an Octave code that concatenates an array and a vector:
> octave:1> a = [1, 2, 3];
> octave:2> b = [ 11, 22, 33; 44, 55 66];
> octave:3> c = [a; b]
>
>
> How do I emulate this behavior in Python (scipy)? This is what i  
> tried:
>

c = np.vstack((a,b))

For more info:
http://www.scipy.org/Numpy_Functions_by_Category#head-ca5d5fe8c131a7ab8f7d7d38796ff84dbf4a2bd0




More information about the SciPy-user mailing list