Should numpy.sqrt(-1) return 1j rather than nan?
Greg Willden
gregwillden at gmail.com
Thu Oct 12 11:19:05 EDT 2006
May I suggest the following change to generate_umath.py?
<completely untested string change>
'sqrt' :
Ufunc(1, 1, None,
'square-root elementwise. For real x, the domain is restricted to
x>=0.\n\
For complex results for x<0 see numpy.scimath.sqrt',
TD(inexact, f='sqrt'),
TD(M, f='sqrt'),
),
'
When sqrt throws a ValueError would it be possible/appropriate for the error
message to mention numpy.scimath.sqrt?
I'm just trying to think of other ways to help make the transition as smooth
as possible for new users.
Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20061012/e3cb9ba3/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list