Answers for "arr.shape"

0

numpy shape

>>> a = np.array([(1, 2), (3, 4)], dtype=[('x', 'i4'), ('y', 'i4')])
>>> np.shape(a)
(2,)
>>> a.shape
(2,)
Posted by: Guest on September-12-2020
0

arr.shape

The shape attribute for numpy arrays returns the dimensions of the array. 

If Arr has m rows and n columns, then Arr. shape is (m,n)
Posted by: Guest on September-15-2021

Code answers related to "arr.shape"

Browse Popular Code Answers by Language