shape : dimensions in form of rows and columns
Size : number of elements in multidimesonal array
import numpy as np
my_arr = np.array([[1,2,3],[4,5,6],[7,8,9]])
print(my_arr)
print("SHAPE OF NUMPY ARRAY:")
print(my_arr.shape)
print("ELEMENTS in NUMPY ARRAY:")
print(my_arr.size)
OUTPUT:
[[1 2 3]
[4 5 6]
[7 8 9]]
SHAPE OF NUMPY ARRAY:
(3, 3)
ELEMENTS in NUMPY ARRAY:
9
On this page of the site you can watch the video online PYTHON PORGRAM TO DEMONSTARTE SHAPE,SIZE of NUMPY ARRAY with a duration of hours minute second in good quality, which was uploaded by the user PythonEnthusiasts 24 June 2024, share the link with friends and acquaintances, this video has already been watched 46 times on youtube and it was liked by 6 viewers. Enjoy your viewing!