I'm using Python 3.9.15 and trying to get the number (0 + infj)
, i.e. the imaginary part is infinite and the real part is zero.
However, I tried several alternatives but all of them gave (nan + infj)
instead of (0 + infj)
.
>>> float('inf') * 1j
(nan+infj)
>>> float('inf') * 1j + 0
(nan+infj)
>>> import numpy as np
>>> np.inf * 1j
(nan+infj)
>>> np.inf * 1j + 0
(nan+infj)
How do I get the number (0 + infj)
?