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))
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))
def test_eval_stats_total_returns_sum(): nt.assert_equal(ms.eval_stats(np.array([1,2,3,4]), 'total'), 10)
def test_eval_stats_empty_input_returns_none(): nt.assert_true(ms.eval_stats([], 'min') is None)
def test_eval_stats_raw_returns_list(): nt.assert_equal(ms.eval_stats(np.array([1,2,3,4]), 'raw'), [1,2,3,4])
def test_eval_stats_total_returns_sum(): assert_equal(ms.eval_stats(np.array([1, 2, 3, 4]), 'total'), 10)
def test_eval_stats_empty_input_returns_none(): ok_(ms.eval_stats([], 'min') is None)
def test_eval_stats_raw_returns_list(): assert_equal(ms.eval_stats(np.array([1, 2, 3, 4]), 'raw'), [1, 2, 3, 4])