コード例 #1
0
def str_ceil_means(pos_means):
    to_ceil_str = lambda x: str(int(x))
    return map_dict(to_ceil_str, pos_means)
コード例 #2
0
def compute_means(pos_costs):
    return map_dict(np.mean, pos_costs)
コード例 #3
0
def test_map_dict():
    got = misc.map_dict(int, {1: '1', 2: '2'})
    assert got == {1: 1, 2: 2}
コード例 #4
0
ファイル: normalize_cost.py プロジェクト: pombredanne/atango
def str_ceil_means(pos_means):
    to_ceil_str = lambda x: str(int(x))
    return map_dict(to_ceil_str, pos_means)
コード例 #5
0
ファイル: normalize_cost.py プロジェクト: pombredanne/atango
def compute_means(pos_costs):
    return map_dict(np.mean, pos_costs)
コード例 #6
0
ファイル: test_misc.py プロジェクト: 5470x3/atango
def test_map_dict():
    got = misc.map_dict(int, {1: '1', 2: '2'})
    assert_equals(got, {1: 1, 2: 2})