[Numpy-tickets] [NumPy] #551: numpy.ndarray messed up after unpickling

NumPy numpy-tickets@scipy....
Thu Apr 10 02:27:59 CDT 2008


#551: numpy.ndarray messed up after unpickling
---------------------------------------+------------------------------------
 Reporter:  cotackst                   |        Owner:  somebody
     Type:  defect                     |       Status:  new     
 Priority:  normal                     |    Milestone:  1.0.5   
Component:  numpy.core                 |      Version:  1.0.1   
 Severity:  critical                   |   Resolution:          
 Keywords:  pickle, ndarray, segfault  |  
---------------------------------------+------------------------------------
Comment (by pv):

 Can this be an alignment issue?
 {{{
 import numpy, cPickle as pickle
 x = numpy.zeros((3,4))
 y = pickle.loads(pickle.dumps(x))
 v = numpy.ones((1, y.shape[0]))

 print "x:", x.__array_interface__['data'][0] % x.dtype.itemsize
 print "y:", y.__array_interface__['data'][0] % y.dtype.itemsize

 numpy.dot(v, x)
 numpy.dot(v, y)
 }}}
 outputs
 {{{
 x: 0
 y: 4
 Segmentation fault
 }}}

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/551#comment:18>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list