Why are complex numbers in Python denoted with 'j' instead of 'i'?

后端 未结 5 2245
-上瘾入骨i
-上瘾入骨i 2020-12-05 03:55

I know this is an electrical engineering convention, but I\'m still wondering why it was chosen for Python. I don\'t know other programming languages with complex-number lit

5条回答
  •  自闭症患者
    2020-12-05 04:40

    i in electrical engineering is typically used for i(t) or instantaneous current. I is for steady state DC (non-complex) or rms values of AC current. In addition spacial coordinates are generally expressed as i,j,k but for two dimensional items i,j are all that are needed and the "i" is dropped so the perpendicular "j" is used as in 4j3 vs 4+3i or 4i3 -See that this is not 413 at a glance. J recognizes this notation in handling complex numbers. As a retired EE prof- I do like the use of "j" As for Current density "J" is used.

提交回复
热议问题