Relative Content

Tag Archive for pythonmemorymemory-managementnumpy-ndarray

np.ones(30011,30011) needs 7.2GB, but Task Manager shows 5.3GB

A 30,011×30,011 of 64-bit floats takes 7.2GB. There are many explanations for why one might see np.zeros([30011,30011]) take up (say) 0.7MB. However, my Windows 2010 Task Manager also shows noticeably less memory than expected for np.ones([30011,30011]). Specifically, 5.3GB, which is almost 2GB less than the expected 7.2GB. What is the explanation for this?