Re: [sympy] Saving large symbolic expressions

2019-08-14 Thread Jason Moore
You can also replace the functions of t with symbols before pickling. Jason moorepants.info +01 530-601-9791 On Wed, Aug 14, 2019 at 9:36 AM Aaron Meurer wrote: > There are lots of issues with pickling and SymPy unfortunately. > Functions in particular have issues because they are dynamically

Re: [sympy] Saving large symbolic expressions

2019-08-14 Thread Aaron Meurer
There are lots of issues with pickling and SymPy unfortunately. Functions in particular have issues because they are dynamically created classes. The best way to save expressions right now is to use srepr/sympify. Aaron Meurer On Wed, Aug 14, 2019 at 4:33 AM Oscar Benjamin wrote: > > This seems

Re: [sympy] Saving large symbolic expressions

2019-08-14 Thread Oscar Benjamin
This seems to be a bug. I think I can reproduce it with: In [9]: import pickle In [10]: from sympy.physics.mechanics import dynamicsymbols In [11]: q1 = dynamicsymbols('q1') In [12]: pickle.dumps(q1) --- PicklingError

[sympy] Saving large symbolic expressions

2019-08-14 Thread Ash
Hello, I have derived the equations of motion of a dynamic system symbolically. To evaluate the Mass Matrix and Coriolis Vector which contain several derivative terms, the program takes around 14 sec. These two are to be used for various other places. I tried saving and loading using 'dill'