MemoryError: Unable to allocate 19.1 GiB for an array with shape (52199, 49069) and data type int64

23 views Asked by At

I am trying to calculate landscape metrics in Python using PyLandStats module for my study area (the whole Sumatra island). The memory needed to process the calculation is 19GB. I am running a laptop with 24GB RAM capacity but it still couldn't process.

Similarly, when I run the calculations using R package, it returns with std::bad_alloc which I guess it cannot allocate enough memory to run.

I am not sure how to proceed with this other than trying to access computer with higher performance. Does anyone have any ideas? i.e. partitioning the job, etc.? I am also curious why the Error pops up when I clearly have more memory capacity than what is required. Any suggestions would be great. Thanks! :)

0

There are 0 answers