示例#1
0
def test_eval_stats_applies_numpy_function():
    modes = ('min', 'max', 'mean', 'median', 'std')

    ref_array = np.array([1,2,3,4,5,6,7,8,9,10])

    for m in modes:
        nt.eq_(ms.eval_stats(ref_array, m),
               getattr(np, m)(ref_array))
示例#2
0
def test_eval_stats_applies_numpy_function():
    modes = ('min', 'max', 'mean', 'median', 'std')

    ref_array = np.arange(1, 10)

    for m in modes:
        nt.eq_(ms.eval_stats(ref_array, m),
               getattr(np, m)(ref_array))
示例#3
0
def test_eval_stats_total_returns_sum():
    nt.assert_equal(ms.eval_stats(np.array([1,2,3,4]), 'total'), 10)
示例#4
0
def test_eval_stats_empty_input_returns_none():
    nt.assert_true(ms.eval_stats([], 'min') is None)
示例#5
0
def test_eval_stats_raw_returns_list():
    nt.assert_equal(ms.eval_stats(np.array([1,2,3,4]), 'raw'), [1,2,3,4])
示例#6
0
def test_eval_stats_total_returns_sum():
    assert_equal(ms.eval_stats(np.array([1, 2, 3, 4]), 'total'), 10)
示例#7
0
def test_eval_stats_empty_input_returns_none():
    ok_(ms.eval_stats([], 'min') is None)
示例#8
0
def test_eval_stats_raw_returns_list():
    assert_equal(ms.eval_stats(np.array([1, 2, 3, 4]), 'raw'), [1, 2, 3, 4])
示例#9
0
def test_eval_stats_empty_input_returns_none():
    nt.assert_true(ms.eval_stats([], 'min') is None)