Re: [sympy] Can you pass a symbolic variable through a function?

2019-06-18 Thread Jean ABOU SAMRA
Hi, Next time, please provide an example code so that people can do their own experiments. I guess you did something like: >>> from math import sqrt >>> from sympy.abc import * >>> sqrt(x) Traceback (most recent call last): File "", line 1, in File

Re: [sympy] Can you pass a symbolic variable through a function?

2019-06-18 Thread Lucy Jackson
When passing symbolic variables through the function i get the error message "can't convert expression to float" This does not happen if I pass numerical values through the function. Any suggestions? On Wed, 5 Jun 2019 at 06:07, Aaron Meurer wrote: > Yes, you should replace 'math' and

Re: [sympy] Can you pass a symbolic variable through a function?

2019-06-04 Thread Aaron Meurer
Yes, you should replace 'math' and 'numpy' with 'sympy', so that the symbolic functions are used. I also recommend using sympy.Matrix for the symbolic expressions. Then, if you want a numeric expression you can use with numpy, use lambdify() to convert the SymPy expression into a numeric

[sympy] Can you pass a symbolic variable through a function?

2019-06-04 Thread Lucy Jackson
I have a function that I have written, attached file, and would like to pass theta, thetad, phi and phid through it as symbolic variables. Therefore hoping for an output in terms of these variables that I can then integrate. Is this possible?? -- You received this message because you are