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


Picture showing the output of the isnan function in numpy
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Saturday, June 1, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250