[SciPy-user] pow bug?

Ryan Krauss ryanfedora at comcast.net
Tue Jul 5 08:43:18 CDT 2005


Does this seem like a bug to anyone else or is it as it should be:

pow(-0.25,0.5)   ->ValueError: negative number cannot be raised to a 
fractional power

pow(-0.25+0j,0.5) ->(3.0615158845559431e-017+0.5j)

If I want the input to always be taken as complex, can I override this 
behavior or should I just add 0j to force a cast of the input?

Ryan



More information about the SciPy-user mailing list