Use math.isnan
:
>>> import math
>>> x = float('nan')
>>> math.isnan(x)
True
More Related Contents:
- Python. Finding thresholds for rows of data
- Does Python IDE have a module which imports math functions such as cos or sin? [closed]
- Evaluating a mathematical expression in a string
- What is the standard way to add N seconds to datetime.time in Python?
- Integer square root in python
- calculating direction of the player to shoot pygame
- What is the best way to get all the divisors of a number?
- How do you print superscript in Python?
- How do I do exponentiation in python? [duplicate]
- How did Python implement the built-in function pow()?
- Algorithm to find which number in a list sum up to a certain number
- Why do “Not a Number” values equal True when cast as boolean in Python/Numpy?
- How can I randomly choose a maths operator and ask recurring maths questions with it?
- numpy max vs amax vs maximum
- Safest way to convert float to integer in python?
- Integer division by negative number [duplicate]
- numpy arbitrary precision linear algebra
- Cubic root of the negative number on python
- What do these operators mean (** , ^ , %, //)? [closed]
- Can someone explain this: 0.2 + 0.1 = 0.30000000000000004? [duplicate]
- Python Math – TypeError: ‘NoneType’ object is not subscriptable
- Generating unique, ordered Pythagorean triplets
- Math Expression Evaluation
- negative pow in python
- How to compute the nth root of a very big integer
- Function to determine if two numbers are nearly equal when rounded to n significant decimal digits
- How to perform bilinear interpolation in Python
- Getting the subsets of a set in Python
- Python cos(90) and cos(270) not 0
- How do I get a decimal value when using the division operator in Python?