Home >>Python cmath Module >Python cmath.nanj Constant

Python cmath.nanj Constant

Python cmath.nanj Constant

Python cmath.nanj constant is used to return a complex nan (Not a Number) value. This value has a 0 real part and nan as the imaginary part.

Syntax:
cmath.nanj
Here is an example of Python cmath.nanj constant:

import cmath 
print (cmath.nanj)
print (type(cmath.nanj))

Output:
nanj
<class 'complex'>

No Sidebar ads