未验证 提交 eb26548f 编写于 作者: 走神的阿圆's avatar 走神的阿圆 提交者: GitHub

Save first point. (#735)

上级 53477b97
......@@ -222,7 +222,7 @@ class _ReservoirBucket(object):
if len(self._items) < self._max_size or self._max_size == 0:
self._items.append(item)
else:
r = self._random.randint(0, self._num_items_index)
r = self._random.randint(1, self._num_items_index)
if r < self._max_size:
self._items.pop(r)
self._items.append(item)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册