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

David Goldsmith David.L.Goldsmith at noaa.gov
Thu Oct 12 01:15:33 CDT 2006


Sven Schreiber wrote:
> Travis Oliphant schrieb:
>
>   
>>> If not, shouldn't
>>>  
>>>
>>> numpy.sqrt(-1) raise a ValueError instead of returning silently nan?
>>>  
>>>
>>>       
>> This is user adjustable.  You change the error mode to raise on 
>> 'invalid' instead of pass silently which is now the default.
>>
>> -Travis
>>
>>     
>
> Could you please explain how this adjustment is done, or point to the
> relevant documentation.
> Thank you,
> Sven
>   
I'm glad you asked this, Sven, 'cause I was thinking that if making this 
"user adjustment" is this advanced (I too have no idea what you're 
talking about, Travis), then this would be another significant strike 
against numpy (but I was holding my tongue, since I'd just let fly in my 
previous email).

DG

-------------------------------------------------------------------------
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