[Numpy-tickets] [NumPy] #600: Cannot load numpy.unicode_ dumped by cPickle
NumPy
numpy-tickets@scipy....
Fri Oct 26 03:40:15 CDT 2007
#600: Cannot load numpy.unicode_ dumped by cPickle
------------------------+---------------------------------------------------
Reporter: Kaloo | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.core | Version: none
Severity: normal | Keywords: cPicle unicode_ dump
------------------------+---------------------------------------------------
The following code is crashing (dumping a unicode field of a ndArray, then
loading it) :
{{{
import numpy
import cPickle
titi = numpy.array(["DROND", "DROND1"], dtype="<U6", order="FORTRAN")
toto = titi[1]
f = open("c:/toto.txt", "w")
cPickle.dump(toto, f)
f.close()
f = open("c:/toto.txt", "r")
t = cPickle.load(f)
}}}
Error is :
'''File "<interactive input>", line 1, in <module>'''
'''ValueError: ('initialization string is too small', <built-in function
scalar>, (dtype('<U6'), 'D\x00R\x00O\x00N\x00D\x001\x00'))'''
With Python 2.5, numpy 1.0.3.1, on Windows XP
--
Ticket URL: <http://scipy.org/scipy/numpy/ticket/600>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list