outofmemoryerror

Memory error (lack of memory, I understand)

There was a strange problem. There is a need to build one from several arrays, but Python does not agree and writes the error ... n entire trajectory, the steps of which are just written in these arrays. Can anyone have any ideas how to avoid this error?