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 <[email protected]> wrote:

> 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 function.
> lambdify() will convert sympy.Matrix into a numpy array.
>
> Aaron Meurer
>
> On Tue, Jun 4, 2019 at 9:36 AM Lucy Jackson <[email protected]>
> wrote:
> >
> > 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 subscribed to the Google
> Groups "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at https://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/1004b533-73fe-4fc6-b051-a91b2a3c3fe9%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2Bwq2e0CQVitLYvbw897nL%3DG9pQH1N8Y9JeO8t0A8c8FQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAGwk1%3DetdW0k6q%2B2LPBAgqq8o55Ng0DiuR5rp32Rt8EuL0NGFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to