1 Answer

# size of NumPy array

143 Views

Bertrand
Punditsdkoslkdosdkoskdo

## size of NumPy array

Is there an equivalent to the MATLAB

` size()`

command in Numpy?

In MATLAB,

```
>>> a = zeros(2,5)
0 0 0 0 0
0 0 0 0 0
>>> size(a)
2 5
```

In Python,

```
>>> a = zeros((2,5))
>>>
array([[ 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0.]])
>>> ?????
```