On Wed, Oct 3, 2012 at 1:58 PM, Will Lee email@example.com wrote:
This seems to be a old problem but I've recently hit with this in a very random way (I'm using numpy 1.6.1). There seems to be a ticket (1239) but it seems the issue is unscheduled. Can somebody tell me if this is fixed?
In particular, it makes for a very unstable behavior when you try to reference something from a string array and pickle it across the wire. For example:
In : import numpy In : a = numpy.array(['a', '', 'b']) In : import cPickle In : s = cPickle.dumps(a) In : cPickle.loads(s)
TypeError Traceback (most recent call last) /auto/cnvtvws/wlee/fstrat/src/<ipython-input-5-555fae2bd4f5> in <module>() ----> 1 cPickle.loads(s) TypeError: ('data type not understood', <type 'numpy.dtype'>, ('S0', 0, 1))
Note that if you reference a and a, it would work, so you're in the case where sometimes it'd work but sometimes it won't. Checking for this case in the code and work around it would really be a pain.
Yes, this has been waiting on the bug tracker for a long while. I'll resubmit my patch as a pull request to see if we can't get this fixed up soon...