

def test_sigma_points_1D():
    ' tests passing 1D data into sigma_points'
    kappa = 0.0
    sp = JulierSigmaPoints(1, kappa)
    (Wm, Wc) = xm.weights()
    assert np.allclose(Wm, Wc, 1e-12)
    assert (len(Wm) == 3)
    mean = 5
    cov = 9
    Xi = sp.sigma_points(mean, cov)
    (xm, ucov) = unscented_transform(Xi, Wm, Wc, 0)
    m = 0.0
    for (x, w) in zip(Xi, Wm):
        m += (x * w)
    assert (abs((m - mean)) < 1e-12)
    assert (abs((xm[0] - mean)) < 1e-12)
    assert (abs((ucov[(0, 0)] - cov)) < 1e-12)
    assert (Xi.shape == (3, 1))

dataset/ETHPy150Open rlabbe/filterpy/filterpy/kalman/tests/test_ukf.py test_sigma_points_1D/VarMisuse@30/58 `sp`->`xm`