A computer algebra system written in pure Python http://sympy.org/ . To get started to with contributing https://github.com/sympy/sympy/wiki/Introduction-to-contributing
solve([abs(x) - 2, arg(x) - pi], x)
is returning [(-2,)]
on the master? It's showing NotImplementedError: solving Abs(x) when the argument is not real or imaginary.
for me although it was returning the correct answer just a while back.
Greetings! A while ago I played around with the LaTeX grammar (https://github.com/sympy/sympy/blob/master/sympy/parsing/latex/LaTeX.g4) and added support for complex conjugates to my dev version of sympy. The modification was really simple and only involved adding \overline
to the grammar file, regenerating the classes via antlr
along with some other small changes to _parse_latex_antlr.py
.
Having the ability to compute arbitrary expressions with complex conjugates is really great for the application I'm building. For example, the return value of parse_expr(str(parse_latex('\overline{3 + 4I}')))
would be 3 - 4*I
, as expected.
That being said, I was thinking about submitting a PR with this change, but wanted to check with the maintainers of sympy
whether this feature makes sense or not. @asmeurer: What do you think?
hi all,
say I have a horrible expression of the form X + sqrt(Y + iZ) where X, Y, Z are some expressions. Can I give sympy this form and ask it to collect X,Y,Z in new variables. Something like
A,B,C = some_collect_function((a**2+b**2)+sqrt((a*b*c)+i(a*d))
should set A = a**2+b**2
, B = a*b*c
and C=a*d
.