[Numpy-discussion] stacking scalars with column vector

Santhosh R san.programming at gmail.com
Sun Dec 4 13:41:04 EST 2011

Hi ,

I am trying to learn python to convert some of my mlab codes to python.Am
new to python.Some help here would be appreciated

I am trying to make a column vector by stacking two scalars-->Xstart,Xend
and second column of n X 2 2Darray-->A

In matlab the code is b=[Xstart;A(:,1);Xend]

I have made the following code

import numpy as np

This works, but is there a more elegant way of doing this.
Also if i define arr_temp as   arr_temp=A[:,0], the array arr_temp which is
supposed to be of shape (n,1) shows as (n,) .Why is this


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20111205/78110cb5/attachment.html>

More information about the NumPy-Discussion mailing list