Python cmath.nanj Constant
Example
Print the value of nanj:
#Import cmath Library
import cmath
# Print the value of nan
print (cmath.nanj)
print (type(cmath.nanj))
Try it Yourself »
Definition and Usage
The cmath.nanj
constant returns a complex
nan (Not a Number) value. This value has a 0 real part, and nan as the
imaginarly part.
The nanj constant is equivalent to complex(0.0,float("nan")
.
Syntax
cmath.nanj
Technical Details
Return Value: | A complex value, nan (Not a Number) |
---|---|
Python Version: | 3.6 |