>>>>> Christian Heimes <li...@cheimes.de> (CH) wrote: >CH> You can write your own phase() function. This function is mostly correct >CH> unless either the real and/or the imag part is NaN or INF.
>CH> from math import atan2 >CH> def phase(z): >CH> z += 1j # convert int, long, float to complex That should be z += 0j >CH> return atan2(z.imag, z.real) -- Piet van Oostrum <p...@cs.uu.nl> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: p...@vanoostrum.org -- http://mail.python.org/mailman/listinfo/python-list