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
Click to Enlarge