Hello, I encountered a peculiar numpy and pickle problem. My version: Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) Mac OS X Tiger In [2]:numpy.__version__ Out[2]:'1.0.4.dev3869' I pickle a matrix, and reload it. Some operations work ok, but others give a hardware error and a crash! I boiled it down to the code below. Can anyone reproduce (or not) this error? thanks, bb -- Brian Blais bblais@bryant.edu http://web.bryant.edu/~bblais ======================================================================= from numpy import matrix,random import pickle w_test=matrix(random.rand(3,21)) fid=open('blah0_test.pickle','wb') pickle.dump(w_test,fid,0) fid.close() fid=open('blah0_test.pickle','rb') w_xh=pickle.load(fid) fid.close() # this works print w_xh*w_xh.T #this works x=matrix(random.rand(2,21)) print x*w_xh.T # this gives a hardware error! x=matrix([0]*21) print x*w_xh.T
On Fri, Nov 02, 2007 at 12:58:33PM -0400, Brian Blais wrote:
I encountered a peculiar numpy and pickle problem. My version:
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) Mac OS X Tiger In [2]:numpy.__version__ Out[2]:'1.0.4.dev3869'
I pickle a matrix, and reload it. Some operations work ok, but others give a hardware error and a crash!
I boiled it down to the code below. Can anyone reproduce (or not) this error?
This ticket looks similar: http://projects.scipy.org/scipy/numpy/ticket/551 Cheers Stéfan
participants (2)
-
Brian Blais -
Stefan van der Walt