Numpy array dimensions

Posted by cristian on Stack Overflow See other posts from Stack Overflow or by cristian
Published on 2010-06-17T12:55:51Z Indexed on 2010/06/17 13:03 UTC
Read the original article Hit count: 247

Filed under:
|
|
|

Hello,

I'm currently trying to learn Numpy and Python. Given the following array:

import numpy as N
a = N.array([[1,2],[1,2]])

Is there a function that returns the dimensions of a (e.g.a is a 2 by 2 array).

size() returns 4 and that doesn't help very much.

Thanks.

© Stack Overflow or respective owner

Related posts about python

Related posts about arrays