摘要: # ### 带权随机算法 def weight_choice(weight): """ :param weight: list对应的权重序列 :return:选取的值在原列表里的索引 """ t = random.randint(0, sum(weight) - 1) for index, val 阅读全文
posted @ 2020-04-16 17:17 斑驳岁月 阅读(286) 评论(0) 推荐(0) 编辑