from array import array from random floats = array(‘d‘,random((for i in range(10**7)) fp = open(‘floats.bin‘,‘wb‘) floats.tofile(fp) fp.close() floats2 = array(‘d‘) fp1 = open(‘floats.bin‘,‘rb‘) floats2.fromfile(fp1,10**7) fp1.close()
标签:dom 浮点 from pen mfile nbsp imp pre blog
from array import array from random floats = array(‘d‘,random((for i in range(10**7)) fp = open(‘floats.bin‘,‘wb‘) floats.tofile(fp) fp.close() floats2 = array(‘d‘) fp1 = open(‘floats.bin‘,‘rb‘) floats2.fromfile(fp1,10**7) fp1.close()
标签:dom 浮点 from pen mfile nbsp imp pre blog
原文地址:https://www.cnblogs.com/Erick-L/p/8270750.html