[Numpy-discussion] dimension along axis?

Grissiom chaos.proton@gmail....
Mon Apr 13 20:50:15 CDT 2009


On Tue, Apr 14, 2009 at 09:47, Charles R Harris
<charlesr.harris@gmail.com>wrote:

> You mean something like this?
>
> In [1]: li1 = np.array([2,3,4])
>
> In [2]: li1[np.newaxis,:].shape
> Out[2]: (1, 3)
>
> Or maybe like this?
>
> In [3]: li1 = np.array([[2,3,4]])
>
> In [4]: li1.shape
> Out[4]: (1, 3)
>
> Chuck
>
>

This is exactly what I want. Thanks ;)

-- 
Cheers,
Grissiom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090414/c9e3454a/attachment.html 


More information about the Numpy-discussion mailing list