

def test_scaled_weights():
    for n in range(1, 5):
        for alpha in np.linspace(0.99, 1.01, 100):
            for beta in range(0, 2):
                for kappa in range(0, 2):
                    sp = MerweScaledSigmaPoints(kappa, alpha, 0, (3 - n))
                    (Wm, Wc) = sp.weights()
                    assert (abs((sum(Wm) - 1)) < 0.1)
                    assert (abs((sum(Wc) - 1)) < 0.1)

dataset/ETHPy150Open rlabbe/filterpy/filterpy/kalman/tests/test_ukf.py test_scaled_weights/VarMisuse@65/80 `n`->`kappa`