OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

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

  • Thread starter Thread starter user2153235
  • Start date Start date
U

user2153235

Guest
A 30,011x30,011 of 64-bit floats takes 7.2GB. There are many explanations for why one might see np.zeros([30011,30011]) take up (say) a miniscule 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?

Afternote: The 5.3GB includes other objects in the main namespace other than x=np.ones([30011,30011]), albeit smaller objects. Stranger still, x=x*3.14 causes memory usage to drop further to 3GB. It dropped further to 1.7GB within a few minutes even though I didn't do anything.
<p>A 30,011x30,011 of 64-bit floats takes 7.2GB. There are many explanations for why one might see <code>np.zeros([30011,30011])</code> take up (say) a miniscule 0.7MB. However, my Windows 2010 Task Manager also shows noticeably less memory than expected for <code>np.ones([30011,30011])</code>. Specifically, 5.3GB, which is almost 2GB less than the expected 7.2GB.</p>
<p>What is the explanation for this?</p>
<p><strong>Afternote:</strong> The 5.3GB includes other objects in the main namespace other than <code>x=np.ones([30011,30011])</code>, albeit smaller objects. Stranger still, <code>x=x*3.14</code> causes memory usage to drop further to 3GB. It dropped further to 1.7GB within a few minutes even though I didn't do anything.</p>
 

Latest posts

S
Replies
0
Views
1
Safwan Aipuram
S

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top