Refactor
Compare with allclose