print('Float32, 1.0 -->', np.spacing(np.float32(1.0)))
print('Float32, 1e12 -->', np.spacing(np.float32(1000000000000.0)))
print('Float32, 1e-12 -->', np.spacing(np.float32(1e-12)))
Machine Epsilon in Python