[sympy] Re: Want to begin contributing towards SymPy

2023-01-09 Thread Mohit Kumar
Welcome Mehul. I am Mohit whom you asked for a good first issue so I have issue(https://github.com/sympy/sympy/issues/13881) with that you can start as it is old and there are lot of conversation on it. Remember to understand a issue properly you need find it in your local code base also. That

[sympy] Convert string of a named expression in sympy to the expression itself

2023-01-09 Thread Santiago S
I have the following code import sympy as sp a, b = sp.symbols('a,b', real=True, positive=True) expr2 = 1.01 * a**1.01 * b**0.99 print(type(expr2), '->', expr2) Now I want a function that takes the string `'expr2'` and returns the expression `1.01 * a**1.01 * b**0.99`. The ultim

[sympy] Re: Convert string of a named expression in sympy to the expression itself

2023-01-09 Thread gu...@uwosh.edu
I am not clear why you are working with strings and not just the expressions? I think the following may be what you want: ``` >>> import sympy as sp >>> a,b = sp.symbols('a b', positive = True) >>> expr = 1.01*a**1.01*b**0.99 >>> expr 1.01*a**1.01*b**0.99 >>> expr1 = 2*expr >>> expr1 2.02*a**1.01*

Re: [sympy] Re: SciPy 2023 CFP

2023-01-09 Thread S.Y. Lee
There were some issues in the sympy live I discovered while using jupyterlive https://github.com/sympy/live/issues/14 https://github.com/sympy/live/issues/16 to share the context, the jupyterlive may be quite experimental and we may need to inspect if it works across most of the mainstream browse

[sympy] Re: Convert string of a named expression in sympy to the expression itself

2023-01-09 Thread Santiago S
Because I want to build the name of the expressions to check by concatenating other strings, and then evaluate. All this within loops, etc. On Monday, January 9, 2023 at 1:42:26 PM UTC-3 gu...@uwosh.edu wrote: > I am not clear why you are working with strings and not just the > expressions? I

Re: [sympy] Re: SciPy 2023 CFP

2023-01-09 Thread Aaron Meurer
On Mon, Jan 9, 2023 at 10:01 AM S.Y. Lee wrote: > > There were some issues in the sympy live I discovered while using jupyterlive > https://github.com/sympy/live/issues/14 > https://github.com/sympy/live/issues/16 > to share the context, the jupyterlive may be quite experimental > and we may need

[sympy] Re: Convert string of a named expression in sympy to the expression itself

2023-01-09 Thread gu...@uwosh.edu
If you really do need to process strings, I think I see where you are having an issue with your experiment. 'expr2' does not give you the string representation of 'expr2'. I think you want this sequence of commands: ``` >>> import sympy as sp >>> a, b = sp.symbols('a,b', real=True, positive=True)

Re: [sympy] Re: Convert string of a named expression in sympy to the expression itself

2023-01-09 Thread Oscar Benjamin
This question was also asked and answered in other places: https://github.com/sympy/sympy/discussions/24483 https://stackoverflow.com/questions/75057460/convert-string-of-a-named-expression-in-sympy-to-the-expression-itself The OP wants eval: In [1]: expr1 = x*y + 1 In [2]: expr1 Out[2]: x⋅y +