Articles → Numpy → Isnan Function In Numpy
Isnan Function In Numpy
Purpose
Example
import numpy as np
print("Is 1 nan:", np.isnan(1))
print("Is 0 nan:", np.isnan(0))
print("Is np.nan nan:", np.isnan(np.nan))
print("Is -np.nan nan:", np.isnan(-np.nan))
Output
Click to Enlarge