示例#1
0
def test11():
    X = np.array([[10, 11, 9], [4, 6, 9]]).T
    Z = fracdiff(X, order=1)
    target = np.array([[np.nan, 1.0, -2.0], [np.nan, 2.0, 3.0]]).T
    npt.assert_allclose(Z, target)
示例#2
0
def test8():
    x = np.array([10, 11, 9])
    z = fracdiff(x, order=2)
    target = np.array([np.nan, np.nan, -3.0])
    npt.assert_allclose(z, target)
示例#3
0
def test7():
    x = np.array([10, 11, 9])
    z = fracdiff(x, order=1)
    target = np.array([np.nan, 1.0, -2.0])
    npt.assert_allclose(z, target)
示例#4
0
def test1():
    x = np.array([10, 11, 9])
    w = [1.0, -1.0]
    z = fracdiff(x, weights=w)
    target = np.array([np.nan, 1.0, -2.0])
    npt.assert_allclose(z, target)
示例#5
0
def test4():
    x = np.array([10, 11, 9])
    z = fracdiff(x, order=2, truncation='find')
    target = np.array([np.nan, np.nan, -3.0])
    npt.assert_allclose(z, target)