|
From: Sven S. <sve...@gm...> - 2006-02-08 17:45:13
|
Gerard Vermeulen schrieb: >> mat(arange(1,10)).transpose() >> >> works, but seems a bit long-winded (in comparison to MATLAB's [1:10]'). > > What about this? > > arange(1, 10)[:, NewAxis] > 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. Compared to [1:10]', that's quite good already... -sven |