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)
  1. 10
  2. 9
  3. 8
  4. 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.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.