In [1]:
import numpy as np
In [2]:
a_inf = np.array([-np.inf, 0, np.inf])
print(a_inf)
In [3]:
print(np.isinf(a_inf))
In [4]:
print(a_inf == np.inf)
In [5]:
print(a_inf == -np.inf)