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

Greg Willden gregwillden at
Thu Oct 12 10:19:05 CDT 2006

May I suggest the following change to

<completely untested string change>
'sqrt' :
    Ufunc(1, 1, None,
          'square-root elementwise. For real x, the domain is restricted to
          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.

-------------- next part --------------
An HTML attachment was scrubbed...
-------------- 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
-------------- next part --------------
Numpy-discussion mailing list
Numpy-discussion at

More information about the Numpy-discussion mailing list