filterpy/kalman/tests/test_kf.py
def proc_form():
    """ This is for me to run against the class_form() function to see which,
    if either, runs faster. They within a few ms of each other on my machine
    with Python 3.5.1"""

    dt = 1.
    std_z = 10.1

    x = np.array([[0.], [0.]])
    F = np.array([[1., dt], [0., 1.]])
    H = np.array([[1.,0.]])
    P = np.eye(2)
    R = np.eye(1)*std_z**2
    Q = Q_discrete_white_noise(2, dt, 5.1)

    pos = 0.
    for t in range (2000):
        z = pos + random.randn() * std_z
        pos += 100

        # perform kalman filtering
        x, P = predict(x, P, F, Q)
        x, P, _ = update(z, R, x, P, H)
 This is for me to run against the class_form() function to see which,
    if either, runs faster. They within a few ms of each other on my machine
    with Python 3.5.1
This is for me to run against the class_form() function to see which,
if either, runs faster. They within a few ms of each other on my machine
with Python 3.5.1
This is for me to run against the class_form () function to see which if either runs faster . They within a few ms of each other on my machine with Python 3 . 5 . 1
def proc_form():
    dt = 1.
    std_z = 10.1
    x = np.array([[0.], [0.]])
    F = np.array([[1., dt], [0., 1.]])
    H = np.array([[1.,0.]])
    P = np.eye(2)
    R = np.eye(1)*std_z**2
    Q = Q_discrete_white_noise(2, dt, 5.1)
    pos = 0.
    for t in range (2000):
        z = pos + random.randn() * std_z
        pos += 100
        x, P = predict(x, P, F, Q)
        x, P, _ = update(z, R, x, P, H)
def proc_form ( ) : dt = 1. std_z = 10.1 x = np . array ( [ [ 0. ] , [ 0. ] ] ) F = np . array ( [ [ 1. , dt ] , [ 0. , 1. ] ] ) H = np . array ( [ [ 1. , 0. ] ] ) P = np . eye ( 2 ) R = np . eye ( 1 ) * std_z ** 2 Q = Q_discrete_white_noise ( 2 , dt , 5.1 ) pos = 0. for t in range ( 2000 ) : z = pos + random . randn ( ) * std_z pos += 100 x , P = predict ( x , P , F , Q ) x , P , _ = update ( z , R , x , P , H )
This is for me to run against the class_form() function to see which,
if either, runs faster.
This is for me to run against the class_form () function to see which if either runs faster .
""" This is for me to run against the class_form() function to see which,
    if either, runs faster. They within a few ms of each other on my machine
    with Python 3.5.1""" # perform kalman filtering