ADVERTISEMENT

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!




ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.