If I put it as (x^2)^(1/5) it works fine.

 

From: sympy@googlegroups.com <sympy@googlegroups.com> On Behalf Of Paul Royik
Sent: Wednesday, December 11, 2024 8:15 PM
To: sympy <sympy@googlegroups.com>
Subject: [sympy] Real-valued root

 

I try to use the bridge between sympy and numpy, namely, the lambdify function.

 

It looks ok, but there is an issue when I try to calculate the values of 
x^(2/5) on the interval [-5,5]. 

 

Of course, for negative x, the value is nan, because, I guess, the root is not 
real-valued.

How to make it real-valued?

 

Thank you.

-- 
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 sympy+unsubscr...@googlegroups.com 
<mailto:sympy+unsubscr...@googlegroups.com> .
To view this discussion visit 
https://groups.google.com/d/msgid/sympy/02b3834f-d2ba-4767-a28e-4b6ae1355906n%40googlegroups.com
 
<https://groups.google.com/d/msgid/sympy/02b3834f-d2ba-4767-a28e-4b6ae1355906n%40googlegroups.com?utm_medium=email&utm_source=footer>
 .

-- 
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 sympy+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sympy/006e01db4c14%24ad823490%2408869db0%24%40gmail.com.

Reply via email to