Using assert_allclose instead of .assert_array_equal seems safer against numerical errors.