Python cmath.nanj Costante
Esempio
Stampa il valore di nanj:
#Import cmath Library
import cmath
# Print the value of nan
print (cmath.nanj)
print (type(cmath.nanj))
Definizione e utilizzo
La cmath.nanj
costante restituisce un valore nan complesso (non un numero). Questo valore ha una parte reale 0 e nan come parte immaginaria.
La costante nanj è equivalente a complex(0.0,float("nan")
.
Sintassi
cmath.nanj
Dettagli tecnici
Valore di ritorno: | Un complex valore, nan (non un numero) |
---|---|
Versione Python: | 3.6 |