Usually I use cPickle
, although I did not make a formal comparison with other methods. In addition, I always write the file as binary and use the highest protocol setting:
f = open('fname.pkl','wb')
cPickle.dump(array_tuple,f,-1)
f.close()
source
share