The problem is related to multiple inverse and add operations. This is related to representing a simple linear FET model. Below are the operations that are being performed. I'm having to decompose these to generate equations for use in optimization. There are additional matrix operations beyond these I would like to do as well, but even just the below is too much.
Yint = sympy.matrix([[2/rb + I*w*2*cb, -1/rb - I*w*cb], [-1/rb - I*w*cb, 1/rb + 1/rc +I*w*(cb + cc)]]) Zint = Yint.inv() Zext = sympy.matrix([[rg + rs + I*w*(lg + ls), rs + I*w*ls],[rs + I*w*ls, rd + rs + I*w*(ld + ls)]]) Z = Zext + Zint Y = Z.inv() Yre = sympy.re(Y) Yim = sympy.im(Y) err = (Yre_me - Yre)**2 + (Yim_me - Yim)**2 Actually, when manually running these equations in the command line interface for symengine, it completed even quicker than I expected. It took on the order of a couple of seconds to complete. When doing the same completely in python with Sympy, it took on the order of minutes to complete. This was the reason I thought about using autowrap to generate the code in C++. Maybe I'm just trying to fit a square peg in a round hole and need to keep looking for the right tool for the job. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b081b222-e4f7-40d4-ae7e-ed0e6bacd65b%40googlegroups.com.
