[Numpy-discussion] arctan2 with complex args
lorenzo bolla
lbolla@gmail....
Sun Apr 29 06:18:24 CDT 2007
Weird behaviour with arctan2(complex,complex).
Take a look at this:
In [11]: numpy.arctan2(1.,1.)
Out[11]: 0.785398163397
In [12]: numpy.arctan2(1j,1j)
---------------------------------------------------------------------------
exceptions.AttributeError Traceback (most recent
call last)
AttributeError: 'complex' object has no attribute 'arctan2'
same error for:
In [13]: numpy.arctan2(1j,1.)
In [14]: numpy.arctan2(1.,1j)
But arctan2 is defined for complex arguments, as far as Octave knows :-) :
octave:7> atan2(1,1)
ans = 0.78540
octave:8> atan2(1j,1j)
ans = 0
octave:9> atan2(1j,1)
ans = 0
octave:10> atan2(1,1j)
ans = 1.5708
bug or wanted behaviour?
Lorenzo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070429/be8e9011/attachment.html
More information about the Numpy-discussion
mailing list