How to use the pymannkendall.sens_slope 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
def test_sens_slope(NoTrendData, TrendData, arbitrary_1d_data):
    # check with no trend data
    NoTrendRes = mk.sens_slope(NoTrendData)
    assert NoTrendRes.slope == 0.0
    
    # check with trendy data
    TrendRes = mk.sens_slope(TrendData)
    assert TrendRes.slope == 1.0
    assert round(TrendRes.intercept) == 0.0
    
    result = mk.sens_slope(arbitrary_1d_data)
    assert result.slope == -0.006369426751592357
    assert result.intercept == 96.15286624203821
github mmhs013 / pyMannKendall / tests / test_pymannkendall.py View on Github external
def test_sens_slope(NoTrendData, TrendData, arbitrary_1d_data):
    # check with no trend data
    NoTrendRes = mk.sens_slope(NoTrendData)
    assert NoTrendRes.slope == 0.0
    
    # check with trendy data
    TrendRes = mk.sens_slope(TrendData)
    assert TrendRes.slope == 1.0
    assert round(TrendRes.intercept) == 0.0
    
    result = mk.sens_slope(arbitrary_1d_data)
    assert result.slope == -0.006369426751592357
    assert result.intercept == 96.15286624203821
github mmhs013 / pyMannKendall / tests / test_pymannkendall.py View on Github external
def test_sens_slope(NoTrendData, TrendData, arbitrary_1d_data):
    # check with no trend data
    NoTrendRes = mk.sens_slope(NoTrendData)
    assert NoTrendRes.slope == 0.0
    
    # check with trendy data
    TrendRes = mk.sens_slope(TrendData)
    assert TrendRes.slope == 1.0
    assert round(TrendRes.intercept) == 0.0
    
    result = mk.sens_slope(arbitrary_1d_data)
    assert result.slope == -0.006369426751592357
    assert result.intercept == 96.15286624203821