开发者

How to store data from odeint() directly into a menmap instead of array?

开发者 https://www.devze.com 2022-12-07 22:30 出处:网络
I am working on solving a differential equation that solves a system of double pendulums. However, my开发者_如何转开发 code requires me to do a billion calculations, so my memory runs out and an error

I am working on solving a differential equation that solves a system of double pendulums. However, my开发者_如何转开发 code requires me to do a billion calculations, so my memory runs out and an error appears.

My original question can be seen here: How can a billions of computations be done without having memory error in python?

An individual told me to use a menmap. The menmap documentation https://numpy.org/doc/stable/reference/generated/numpy.memmap.html#numpy-memmap shows me how to transfer from an array into a menmap but in my case, I want to transfer my data directly into the menmap as storing the data in the array returns a memory error.

Any kind of help to help to store the data directly into the menmap would be appreciated.

0

精彩评论

暂无评论...
验证码 换一张
取 消