tylerjereddy / pycon-2017

Mastering scipy.spatial PyCon 2017 Tutorial
MIT License
25 stars 6 forks source link

ImportError: No module named 'numpy.core.multiarray\r' #1

Open elinz opened 7 years ago

elinz commented 7 years ago

Received "ImportError: No module named 'numpy.core.multiarray\r'" on various code block which run pickle on the following lines:

6.4.2) 3D flu_coords = pickle.load(open('flu_coords.p','rb'), encoding='latin1') # was pickled in py2, so encoding issues

8.3) Practical Problem Solving with scipy.spatial.Voronoi() array_pump_coords = pickle.load(open('array_pump_data.p','rb'), encoding='latin1')

tylerjereddy commented 7 years ago

Hmm pickle stuff can be tricky. Are you running on Windows? I should probably use the npy format instead of pickle for these.

elinz commented 7 years ago

Yes, I am running Python on windows 64 bit OS (Windows 8.1 Enterprise). Thank you.

tylerjereddy commented 7 years ago

Can you try executing the latest version of the notebook if you have a minute? I've replaced all usage of pickle with np.load and the equivalent npy files, which should increase compatibility.