示例#1
0
def test_stride_pi(lorenz_dataset):
    _, _, X, _, _ = lorenz_dataset
    X = X[:, :3]
    pi = calc_pi_from_data(X, 4)
    pi2 = calc_pi_from_data(X, 4, stride=2)
    assert pi != pi2
    pi2 = calc_pi_from_data(X, 4, stride=.5)
    assert pi != pi2
def test_compare_ccm_data_pi(lorenz_dataset):
    """Test whether calculating PI from cross cov mats versus data
    gives equivalent PI."""
    T, d, X, ccms, _ = lorenz_dataset
    assert_allclose(calc_pi_from_cross_cov_mats(ccms), calc_pi_from_data(X, T))