complex Numeric arrays
Peter Otten
__peter__ at web.de
Mon Nov 24 12:58:48 EST 2003
Christian Kristukat wrote:
>> how can I evaluate a expression like the following:
>> 1/(a + jb) where j is the imaginary unit and a and b are Numeric real
>> float arrays. I don't want to have to split up the expression in real
>> and imaginary parts.
>
> I just found it out by myself:
>
> 1/(a+b*1j)
Or
>>> a = 1
>>> b = 2
>>> 1/complex(a,b)
(0.20000000000000001-0.40000000000000002j)
Peter
More information about the Python-list
mailing list