[Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines
Thu Nov 5 14:11:32 CST 2009
Thanks for your reply. Using 'wb' instead of 'w' for the file mode
evidently makes this problem go away.
The mystery is that why does this work with plain lists *and* 'w' and
not with numpy arrays and 'w'. In other words, why is it that
numpy.array needs the binary mode while list does not?
Also, for my own edification, how did you know that my "pickle files
produced on Windows were contaminated by \r\n line feeds".
On Thu, Nov 5, 2009 at 5:47 AM, Pauli Virtanen <email@example.com> wrote:
> Wed, 04 Nov 2009 19:21:57 -0800, Reckoner wrote:
>> Bruce :
>> The file in question was created as shown in the prior e-mail. Here it
>> is again:
> Your pickle files produced on Windows are contaminated by \r\n line
> feeds. AFAIK, pickle is supposed to be a binary stream.
> You need to open the files in binary 'wb' mode, not in text 'w' mode.
> Pauli Virtanen
> NumPy-Discussion mailing list
More information about the NumPy-Discussion