Why not using `with np.errstate(divide='ignore', invalid='ignore')`?