37,720
社区成员
发帖
与我相关
我的任务
分享
#!/usr/bin/python
# -*- coding:utf-8 -*-
import numpy as np
import random
f1 = open('data1.txt','w')
v1 = 2**32-1
for i in range(100000):
print i
for j in range(350):
s1 = str(random.randint(0,v1))
f1.write(s1)
f1.write(',')
f1.write('\n')
f1.close()
这个数据产生的文件有300多M
当数据降到10000时就可顺利载入
@my_thinkpad[L:01-391815450]|17> run test.py
@my_thinkpad[L:01-391815450]|18> who
data1 f1 i j np random s1 v1
@my_thinkpad[L:01-391815450]|19> data1.shape
<19> (10000, 351)