How to use the pymannkendall.pre_whitening_modification_test function in pymannkendall

To help you get started, we’ve selected a few pymannkendall examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mmhs013 / pyMannKendall / tests / test_pymannkendall.py View on Github external
# check with no trend data
    NoTrendRes = mk.pre_whitening_modification_test(NoTrendData)
    assert NoTrendRes.trend == 'no trend'
    assert NoTrendRes.h == False
    assert NoTrendRes.p == 1.0
    assert NoTrendRes.z == 0
    assert NoTrendRes.Tau == 0.0
    
    # check with trendy data
    TrendRes = mk.pre_whitening_modification_test(TrendData)
    assert TrendRes.trend == 'increasing'
    assert TrendRes.h == True
    assert TrendRes.p == 0.0
    
    # check with arbitrary data
    result = mk.pre_whitening_modification_test(arbitrary_1d_data)
    assert result.trend == 'no trend'
    assert result.h == False
    assert result.p == 0.9212742990272651
    assert result.z == -0.09882867695903437
    assert result.Tau == -0.003545066045066045
    assert result.s == -219.0
    assert result.var_s == 4865719.0
github mmhs013 / pyMannKendall / tests / test_pymannkendall.py View on Github external
def test_pre_whitening_modification_test(NoTrendData, TrendData, arbitrary_1d_data):
    # check with no trend data
    NoTrendRes = mk.pre_whitening_modification_test(NoTrendData)
    assert NoTrendRes.trend == 'no trend'
    assert NoTrendRes.h == False
    assert NoTrendRes.p == 1.0
    assert NoTrendRes.z == 0
    assert NoTrendRes.Tau == 0.0
    
    # check with trendy data
    TrendRes = mk.pre_whitening_modification_test(TrendData)
    assert TrendRes.trend == 'increasing'
    assert TrendRes.h == True
    assert TrendRes.p == 0.0
    
    # check with arbitrary data
    result = mk.pre_whitening_modification_test(arbitrary_1d_data)
    assert result.trend == 'no trend'
    assert result.h == False
github mmhs013 / pyMannKendall / tests / test_pymannkendall.py View on Github external
def test_pre_whitening_modification_test(NoTrendData, TrendData, arbitrary_1d_data):
    # check with no trend data
    NoTrendRes = mk.pre_whitening_modification_test(NoTrendData)
    assert NoTrendRes.trend == 'no trend'
    assert NoTrendRes.h == False
    assert NoTrendRes.p == 1.0
    assert NoTrendRes.z == 0
    assert NoTrendRes.Tau == 0.0
    
    # check with trendy data
    TrendRes = mk.pre_whitening_modification_test(TrendData)
    assert TrendRes.trend == 'increasing'
    assert TrendRes.h == True
    assert TrendRes.p == 0.0
    
    # check with arbitrary data
    result = mk.pre_whitening_modification_test(arbitrary_1d_data)
    assert result.trend == 'no trend'
    assert result.h == False
    assert result.p == 0.9212742990272651
    assert result.z == -0.09882867695903437
    assert result.Tau == -0.003545066045066045
    assert result.s == -219.0
    assert result.var_s == 4865719.0