AngouriMath
ToSymPy
Method with 2 overloads
ToSymPy
Summary
Generates Python code that you can use with sympyToSymPy(System.Boolean)
Summary
Generates python code without any additional symbols that can be run in SymPy
Parameter "parenthesesRequired"
Whether to wrap it with parentheses
Usually depends on its parental nodes
Example
using System; using static AngouriMath.MathS; var (x, y, a) = Var("x", "y", "a"); var expr = Limit(Integral(Sin(x) / (Cos(x) + Tan(y)), x) / a, y, +oo); Console.WriteLine(expr); Console.WriteLine("----------------------------"); Console.WriteLine(ToSympyCode(expr));
Prints
limit(integral(sin(x) / (cos(x) + tan(y)), x) / a, y, +oo) ---------------------------- import sympy x = sympy.Symbol('x') y = sympy.Symbol('y') a = sympy.Symbol('a') expr = sympy.limit(sympy.integrate(sympy.sin(x) / (sympy.cos(x) + sympy.tan(y)), x, 1) / a, y, +oo)
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online