Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-05 Thread Reckoner
Pauli : 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

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-05 Thread Robert Kern
On Thu, Nov 5, 2009 at 14:11, Reckoner recko...@gmail.com wrote: Pauli : 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

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-05 Thread Pauli Virtanen
Thu, 05 Nov 2009 12:11:32 -0800, Reckoner wrote: Pauli : 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

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
Here's an example: On winxp 64-bit: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy import cPickle a = numpy.eye(10) cPickle.dump(a,open('from32bitxp.pkl','w')) import

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Charles R Harris
On Wed, Nov 4, 2009 at 7:06 AM, Reckoner recko...@gmail.com wrote: Here's an example: On winxp 64-bit: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy import cPickle a =

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
Thanks for your reply. No. I just tried it with the latest Windows XP 32-bit version Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy numpy.__version__ '1.3.0' Same result on the

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Bruce Southey
On Wed, Nov 4, 2009 at 8:06 AM, Reckoner recko...@gmail.com wrote: Here's an example: On winxp 64-bit: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import numpy import cPickle a =

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
Bruce : The file in question was created as shown in the prior e-mail. Here it is again: cPickle.dump(a,open('from32bitxp.pkl','w')) Thanks! On Wed, Nov 4, 2009 at 3:56 PM, Bruce Southey bsout...@gmail.com wrote: On Wed, Nov 4, 2009 at 8:06 AM, Reckoner recko...@gmail.com wrote: Here's an

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-04 Thread Reckoner
FYI, I uploaded the two files in question to the numpy ticket http://projects.scipy.org/numpy/ticket/1284 Thanks! On Wed, Nov 4, 2009 at 3:56 PM, Bruce Southey bsout...@gmail.com wrote: On Wed, Nov 4, 2009 at 8:06 AM, Reckoner recko...@gmail.com wrote: Here's an example: On winxp

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-03 Thread Bruce Southey
On Mon, Nov 2, 2009 at 6:31 PM, Reckoner recko...@gmail.com wrote: thanks for the suggestion! I will look into it. The other thing is that the numpy arrays in question are actually embedded in another object. When I convert the numpy arrays into plain lists, and then cPickle them, there is no

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-02 Thread Reckoner
Anybody have any ideas here? Otherwise, I'm thinking this should be posted to the numpy bugs list. What's the best way to report a bug of this kind? Thanks! On Fri, Oct 30, 2009 at 5:48 PM, Reckoner recko...@gmail.com wrote: Robert Kern wrote: You can import numpy.core.multiarray on both

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-02 Thread Robert Kern
On Mon, Nov 2, 2009 at 15:42, Reckoner recko...@gmail.com wrote: Anybody have any ideas here? Nope! Otherwise, I'm thinking this should be posted to the numpy bugs list. What's the best way to report a bug of this kind? Create a new ticket on the Trac: http://projects.scipy.org/numpy/ If

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-02 Thread Bruce Southey
On Mon, Nov 2, 2009 at 2:42 PM, Reckoner recko...@gmail.com wrote: Anybody have any ideas here? Otherwise, I'm thinking this should be posted to the numpy bugs list. What's the best way to report a bug of this kind? Thanks! On Fri, Oct 30, 2009 at 5:48 PM, Reckoner recko...@gmail.com

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-11-02 Thread Reckoner
thanks for the suggestion! I will look into it. The other thing is that the numpy arrays in question are actually embedded in another object. When I convert the numpy arrays into plain lists, and then cPickle them, there is no problem with any of the larger objects. That is the way we are

[Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-10-30 Thread Reckoner
Hi, % python -c 'import numpy.core.multiarray' works just fine, but when I try to load a file that I have transferred from another machine running Windows to one running Linux, I get: % python -c 'import cPickle;a=cPickle.load(open(matrices.pkl))' Traceback (most recent call last): File

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-10-30 Thread Robert Kern
On Fri, Oct 30, 2009 at 13:13, Reckoner recko...@gmail.com wrote: Hi, % python -c 'import numpy.core.multiarray' works just fine, but when I try to load a file that I have transferred from another machine running Windows to one running Linux, I get: %  python -c 'import

Re: [Numpy-discussion] persistent ImportError: No module named multiarray when moving cPickle files between machines

2009-10-30 Thread Reckoner
Robert Kern wrote: You can import numpy.core.multiarray on both machines? Yes. For each machine separately, you can cPickle files with numpy arrays without problems loading/dumping. The problem comes from transferring the win32 cPickle'd files to Linux 64 bit and then trying to load them.