[SciPy-user] scipy.sqrt (-1)

Pujo Aji ajikoe at gmail.com
Fri May 26 13:41:41 EDT 2006


Hello,

It seems that the scipy documentation should be changed a bit.
It is in page 3 http://www.scipy.org/Documentation scipy tutorial:
Finally, some of the basic functions like log, sqrt, and inverse trig
functions have been modifed to return
complex numbers instead of NaN's where appropriate (i.e. scipy.sqrt(-1)
returns 1j).

Thanks,
pujo


On 5/26/06, Bill Baxter <wbaxter at gmail.com> wrote:
>
> I think that's expected.  If you want to get a complex output, you have to
> give it a complex input like:
> >> scipy.sqrt(-1+0j)
> 1j
> or
> >> scipy.sqrt(complex(-1))
> 1j
>
>
> --bb
>
> On 5/26/06, Pujo Aji <ajikoe at gmail.com> wrote:
>
> > Hello,
> I use scipy 0.4.9:
> I ran scipy.sqrt(-1) hopefully it gives me 1j but I've got :
> -1.#IND
>
> Is that normal?
>
> Thanks,
> pujo
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
>
>
>
>
> --
> William V. Baxter III
> OLM Digital
> Kono Dens Building Rm 302
> 1-8-8 Wakabayashi Setagaya-ku
> Tokyo, Japan  154-0023
> +81 (3) 3422-3380
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20060526/ba5c9128/attachment.html>


More information about the SciPy-User mailing list