changed to np.isinf