def expmin(values, num):
"""
Return a list of `num` exponentially distributed numbers from the
list `values`, starting at the lowest one. The base is the constant `e`.
"""
l = len(values)
v = []
for i in range(num):
index = int((exp(i / num) - 1.0) / (e - 1.0) * l)
index = clipint(index, l)
v.append(values[index])
return v
评论列表
文章目录