[Numpy-discussion] dimension along axis?

Grissiom chaos.proton at gmail.com
Mon Apr 13 21:50:15 EDT 2009


On Tue, Apr 14, 2009 at 09:47, Charles R Harris
<charlesr.harris at 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.python.org/pipermail/numpy-discussion/attachments/20090414/c9e3454a/attachment.html>


More information about the NumPy-Discussion mailing list