A better way is to use npy file to transfer dict between python2 and python3, instead of json or pickle.
in python 3:-
np.save('temp.npy', data)
np.save('temp.npy', data)
in python2:-
data = np.load('temp.npy',allow_pickle='TRUE').item()
(note that python 2 must upgrade numpy to latest version)
No comments:
Post a Comment