Report Bug
Qus :

What will be the output of following Python code?

import numpy as np
a = np.array([(10,20,30)])
print(a.itemsize)

Qus

निम्नलिखित पायथन कोड का आउटपुट क्या होगा?

import numpy as np
a = np.array([(10,20,30)])
print(a.itemsize)


A. 10
B. 9
C. 4
D. All of the mentioned above


Solution
C. 4



Explanation

Using itemsize, we can determine the byte size of each element. In the above code, a single-dimensional array has built, and we can determine the size of each element with the aid of the itemsize function.





Report Bug