Python NumPy: Find the memory size of a NumPy array
Python NumPy: Array Object Exercise-33 with Solution
Write a Python program to find the memory size of a NumPy array.
import numpy as np n = np.zeros((4,4)) print("%d bytes" % (n.size * n.itemsize))
Python Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?