Home »
Python »
Python NumPy MCQs
What will be the output of following Python code (2)?
15. What will be the output of following Python code?
import numpy as np
a = np.array([(10,20,30)])
print(a.itemsize)
- 10
- 9
- 8
- All of the mentioned above
Answer: C) 8
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.