Example #1
0
def str_ceil_means(pos_means):
    to_ceil_str = lambda x: str(int(x))
    return map_dict(to_ceil_str, pos_means)
Example #2
0
def compute_means(pos_costs):
    return map_dict(np.mean, pos_costs)
Example #3
0
def test_map_dict():
    got = misc.map_dict(int, {1: '1', 2: '2'})
    assert got == {1: 1, 2: 2}
Example #4
0
def str_ceil_means(pos_means):
    to_ceil_str = lambda x: str(int(x))
    return map_dict(to_ceil_str, pos_means)
Example #5
0
def compute_means(pos_costs):
    return map_dict(np.mean, pos_costs)
Example #6
0
def test_map_dict():
    got = misc.map_dict(int, {1: '1', 2: '2'})
    assert_equals(got, {1: 1, 2: 2})