|
From: Gerard V. <ger...@gr...> - 2006-02-08 15:21:21
|
On Wed, 8 Feb 2006 16:10:52 +0200 Stefan van der Walt <st...@su...> wrote: > This is probably a silly question, but what is the best way of > creating column vectors? 'arange' always returns a row vector, on > which you cannot perform 'transpose' since it has only one dimension. > > mat(arange(1,10)).transpose() > > works, but seems a bit long-winded (in comparison to MATLAB's [1:10]'). > > I'd appreciate pointers in the right direction. > What about this? arange(1, 10)[:, NewAxis] Gerard |