You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to implement the _update_equation_with_symbol_definitions function something like the code below:
def_update_equation_with_symbol_definitions(equation: str):
"""Find all letters in the given equation and replace them with the appropriate call to the sympy.symbols function."""fromstringsimportasciiLettersascii_letters= [charforcharinequationifcharinasciiLetters()]
forletterinset(ascii_letters):
equation=equation.replace(letter, f'sympy.symbols("{letter}")')
returnequation
Then, I would like to use it in the equation_solve function so that someone can pass in an equation like y = x ^ 3 + 2 and both y and x will be converted to sympy symbols.
The text was updated successfully, but these errors were encountered:
What?
I would like to implement the
_update_equation_with_symbol_definitions
function something like the code below:Then, I would like to use it in the
equation_solve
function so that someone can pass in an equation likey = x ^ 3 + 2
and bothy
andx
will be converted to sympy symbols.The text was updated successfully, but these errors were encountered: