29 Apr
2007
29 Apr
'07
7:18 a.m.
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.
6177
Age (days ago)
6178
Last active (days ago)
12 comments
4 participants
participants (4)
-
Anne Archibald
-
David Goldsmith
-
lorenzo bolla
-
Timothy Hochberg