If you preface this by
sage: I = CC.0
then you will be working with the complex square root of -1, rather than
the symbolic one. Computations should be much faster. With this change
and your code,
sage: z.subs(K1=3, K2=12).real()
is pretty fast. I get
sage: timeit('n(z.subs(K1=3, K2=12).real())')
125 loops, best of 3: 2.13 ms per loop
I'm sure there are other solutions, too.
--
John
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org