use assert_allclose to test