Q:

Write a NumPy program to find the memory size of a NumPy array

0

Write a NumPy program to find the memory size of a NumPy array.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import numpy as np
n = np.zeros((4,4))
print("%d bytes" % (n.size * n.itemsize))

Sample Output:

128 bytes

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now