Numpy is known for optimized arrays and various advantages over python-lists. But when I check for the memory usage python-lists have less space than the numpy arrays. The code I used is entered below. Can anyone explain me why?
import sys
Z = np.zeros((10,10),dtype = int)
A = [[0] * 10] * 10
print(A,'\n',f'{sys.getsizeof(A)} bytes')
print(Z,'\n',f'{Z.size * Z.itemsize} bytes')