Пример #1
0
def test_within_n_std():
    df = pd.DataFrame({'A': np.arange(10), 'B': list('abcde') * 2})
    tm.assert_frame_equal(df, ck.within_n_std(df))
    tm.assert_frame_equal(df, dc.within_n_std()(_noop)(df))

    with pytest.raises(AssertionError):
        ck.within_n_std(df, .5)
    with pytest.raises(AssertionError):
        dc.within_n_std(.5)(_noop)(df)
Пример #2
0
def test_within_n_std():
    df = pd.DataFrame({'A': np.arange(10)})
    tm.assert_frame_equal(df, ck.within_n_std(df))
    tm.assert_frame_equal(df, dc.within_n_std()(_noop)(df))

    with pytest.raises(AssertionError):
        ck.within_n_std(df, .5)
    with pytest.raises(AssertionError):
        dc.within_n_std(.5)(_noop)(df)
Пример #3
0
 def wrapper(*args, **kwargs):
     result = func(*args, **kwargs)
     ck.within_n_std(result, n=n)
     return result
Пример #4
0
 def wrapper(*args, **kwargs):
     result = func(*args, **kwargs)
     ck.within_n_std(result, n=n)
     return result