Should numpy.sqrt(-1) return 1j rather than nan?

David Goldsmith David.L.Goldsmith at noaa.gov
Thu Oct 12 02:18:57 CDT 2006


Travis Oliphant wrote:
> David Goldsmith wrote:
>   
>> Travis Oliphant wrote:
>>   
>>     
>>> What could be simpler? ;-)
>>>     
>>>       
>> Having sqrt(-1) return 1j (without having to remember that in order to 
>> get this, you have to write sqrt(-1+0j) instead).
>>
>>   
>>     
> That's exactly what scipy.sqrt(-1) does.  That was my point.
>   
But I don't want to have to use scipy (which so far I haven't needed for 
any other reason) just to get this one behavior.  But my personal 
preferences aside, I say again: if numpy doesn't behave this way, you 
*will* be "scaring" away many potential users.  If you can live with 
that, so be it.

DG

DG
> -Travis
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Numpy-discussion mailing list