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