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 MemoryErrorin my script, it looks like this

F = np.array([C3,C1,-Q1,A1,-F1]) , where C3,C1,Q1,A1,F1are also arrays.

In principle, everything worked in MatLab, but here it does not want to. There is an idea that maybe you can overlay arrays on top of each other not in a common file, but in parts, but how can this be implemented if in the end I need an entire trajectory, the steps of which are just written in these arrays. Can anyone have any ideas how to avoid this error?

Author: gil9red, 2017-06-30

1 answers

okey. I don't know if anyone will need it, but I understand that it is customary to write an answer to a question here, if you found it yourself.

The problem was the use of np.array, due to this, matrices were written into matrices and there was a pile-up. It was much more appropriate to use F = np.vstack((C3,C1,-1*Q1,A1,-1*F1)), which in turn would allow you to write the arrays one after the other and implement your plan.

Thank you to everyone who tried to help solve this problem.

 3
Author: Mary, 2017-07-19 08:55:12