Python cmath.nanj Constante
Exemple
Imprimer la valeur de nanj :
#Import cmath Library
import cmath
# Print the value of nan
print (cmath.nanj)
print (type(cmath.nanj))
Définition et utilisation
La cmath.nanj
constante renvoie une valeur complexe nan (pas un nombre). Cette valeur a une partie réelle 0 et nan comme partie imaginaire.
La constante nanj est équivalente à complex(0.0,float("nan")
.
Syntaxe
cmath.nanj
Détails techniques
Valeur de retour : | Une complex valeur, nan (pas un nombre) |
---|---|
Version Python : | 3.6 |