示例#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
def str_ceil_means(pos_means):
    to_ceil_str = lambda x: str(int(x))
    return map_dict(to_ceil_str, pos_means)
示例#5
0
def compute_means(pos_costs):
    return map_dict(np.mean, pos_costs)
示例#6
0
def test_map_dict():
    got = misc.map_dict(int, {1: '1', 2: '2'})
    assert_equals(got, {1: 1, 2: 2})