is_valid check now allows for 1e-6 rtol due to roundoff