Write a NumPy 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))
Sample Output:
128 bytes
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer