Here, you could have used `with np.errstate`.