Also please define the variable `eps = np.spacing(1)` once.