Hello all,
I have a complex-valued symbol z, and I would like its product with its
conjugate (z z^*) to be simplified to |z|^2. Currently sympy seems to
consider them to be different:
from sympy import *
init_printing()
z = Symbol('z', complex=True)
pprint(simplify(z * z.conjugate() - abs(z) ** 2))
_ 2
z⋅z - │z│
Besides simplify() I have also tried powsimp(), with the same result. Is
there some other simplification function that does this transformation?
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.