Forums

numpy.core._exceptions.MemoryError: Unable to allocate 835. GiB for an array with shape (334863, 334863) and data type float64

Running my code I got this error:

numpy.core._exceptions.MemoryError: Unable to allocate 835. GiB for an array with shape (334863, 334863) and data type float64

to fix it I found this solution(it worked on my machine):

https://www.pythonfixing.com/2022/01/fixed-unable-to-allocate-array-with.html

which I have to run this command (as root): $ echo 1 > /proc/sys/vm/overcommit_memory

but user root does not exist!

would you please help me solve this

On PythonAnywhere users don't have root access, so you can't do that.