visualization.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:pyinduct 作者: pyinduct 项目源码 文件源码
def create_colormap(cnt):
    """
    create a colormap containing cnt values
    :param cnt:
    :return:
    """
    col_map = pg.ColorMap(np.array([0, .5, 1]),
                          np.array([[0, 0, 1., 1.], [0, 1., 0, 1.], [1., 0, 0, 1.]]))
    indexes = np.linspace(0, 1, cnt)
    return col_map.map(indexes, mode="qcolor")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号