摘要: def counter(list): c_dict = {} for i in list: if i in c_dict: c_dict[i] += 1 else: c_dict[i] = 1 return c_dict def entropy(x): counts = counter(x) #每个 阅读全文
posted @ 2024-03-09 10:08 华小电 阅读(109) 评论(0) 推荐(0) 编辑