I have a numpy, saved as data.dat file in python 3+ . When I load it in python 2.7
import numpy as np
data = np.load("data.data")
it throws error as
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
<ipython-input-17-c9c3d37c74d4> in <module>()
8 startTime = datetime.now()
9 vocabulary =[]
---> 10 data =np.load("data.dat")
/usr/lib/python2.7/dist-packages/numpy/lib/npyio.pyc in load(file, mmap_mode)
399 except:
400 raise IOError(
--> 401 "Failed to interpret file %s as a pickle" % repr(file))
402 finally:
403 if own_fid:
IOError: Failed to interpret file 'data.dat' as a pickle
Is there any way to solve it ?