|
From: Stefan v. d. W. <st...@su...> - 2006-02-08 20:24:29
|
On Wed, Feb 08, 2006 at 06:44:54PM +0100, Sven Schreiber wrote: > Gerard Vermeulen schrieb: >=20 > >> mat(arange(1,10)).transpose() > >> > >> works, but seems a bit long-winded (in comparison to MATLAB's [1:10]= '). >=20 > >=20 > > What about this? > >=20 > > arange(1, 10)[:, NewAxis] > >=20 >=20 > The numpy-book beats both of us (see my previous post) in terms of > minimal typing overhead by suggesting r_[1:10,'c'] which produces a > matrix type, very nice. Thanks for your effort, that's exactly what I was looking for! Time to get hold of that book... Cheers St=E9fan |