提交 f45ff7b9 编写于 作者: S superjom

fix scalar

上级 e5987ddc
......@@ -40,11 +40,11 @@ def get_scalar(storage, mode, tag, num_records=100):
result = []
# sample some records to reduce data size
if len(result) > num_records:
span = len(result) / num_records
if len(data) > num_records:
span = len(result) * 1. / num_records
id = 0
while id <= num_records:
result.append(data[id])
result.append(data[int(id)])
id += span
else:
result = data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册