Articles → Numpy → Isinf Function In Numpy

Isinf Function In Numpy






Purpose





Example


import numpy as np

print("Is 1 infinite:", np.isinf(1))
print("Is 0 infinite:", np.isinf(0))
print("Is np.inf infinite:", np.isinf(np.inf))
print("Is -np.inf infinite:", np.isinf(-np.inf))



Output


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


Posted By  -  Karan Gupta
 
Posted On  -  Friday, May 31, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250