标签:pen append dom amp sample ret choice return turn
def getSample(s,i,v):
random_p = np.random.random()
p = len(s)/(len(s)+i)
if random_p < p:
s.remove(np.random.choice(s))
s.append(v)
return s
标签:pen append dom amp sample ret choice return turn
原文地址:https://www.cnblogs.com/ffeng0312/p/10100220.html