'complex' function with string argument.
wxjmfauth at gmail.com
wxjmfauth at gmail.com
Wed Mar 19 03:30:55 EDT 2014
z = a + b*i with a, b, elements of R
z = r*exp(i*phi) with r, phi, elements of R
z = [[a, -b], [b, a]] with a, b, elements of R
This is, in my mind, more questionable:
>>> complex(2, 1+1j)
(1+1j)
>>>
>>> print(complex.__doc__)
complex(real[, imag]) -> complex number
Create a complex number from a real part and an optional imaginary part.
This is equivalent to (real + imag*1j) where imag defaults to 0.
jmf
More information about the Python-list
mailing list