Exemplo n.º 1
0
def test_vals2colors_list_of_lists():
    assert np.allclose(
        helpers.vals2colors([[0], [.5], [1]]),
        [(0.2009432271103454, 0.20707420255623613, 0.20941176489287733),
         (0.23065488108622481, 0.4299115830776738, 0.50588235901851286),
         (0.26537486525142889, 0.65373320018543912, 0.79918494084302116)])
Exemplo n.º 2
0
def test_vals2colors_list_of_lists():
    assert np.allclose(helpers.vals2colors(
        [[0], [.5],
         [1]]), [(0.9629680891964629, 0.9860207612456747, 0.9360092272202999),
                 (0.7944636678200693, 0.9194156093810073, 0.7700884275278739),
                 (0.4740484429065744, 0.7953863898500577, 0.7713956170703576)])