def save_obj(obj, name ):
with open('obj/'+ name + '.pkl', 'wb') as f:
pickle.dump(obj, f, pickle.HIGHEST_PROTOCOL)
def load_obj(name ):
with open('obj/' + name + '.pkl', 'rb') as f:
return pickle.load(f)
import _pickle as pickle
def save_obj(obj, name):
with open(name, 'wb') as f:
pickle.dump(obj, f)
def load_obj(name ):
with open(name, 'rb') as f:
return pickle.load(f)
# fpath = 'data.pkl'