Hi there,<div>I'm new to pypy and trying it out on some numerical projects and the speed of pypy+numpy is about 4x faster than cpython+numpy. Pretty impressive!</div><div><br></div><div>However, I want to pickle some of my numpy objects and I get the error: TypeError: can't pickle numarray objects (full error is included below)</div>
<div><br></div><div>I realise that the numpy implementation in pypy is currently a proof-of-concept, and so I was wondering what I would have to change to get numarray's to be pickle-able. As simple as adding a something like a __pickle__ method to numarray? Or is the problem deeper than that?</div>
<div><br></div><div>Mike.</div><div><br></div><div><br></div><div><br></div><div><div>>>>> import pickle, numpy</div><div>>>>> a = numpy.array([1,2,3])</div><div>>>>> pickle.dumps(a)</div>
<div>Traceback (most recent call last):</div><div> File "<console>", line 1, in <module></div><div> File "/Users/mike/pypy-1.6/lib-python/modified-2.7/pickle.py", line 1423, in dumps</div>
<div> Pickler(file, protocol).dump(obj)</div><div> File "/Users/mike/pypy-1.6/lib-python/modified-2.7/pickle.py", line 224, in dump</div><div> self.save(obj)</div><div> File "/Users/mike/pypy-1.6/lib-python/modified-2.7/pickle.py", line 306, in save</div>
<div> rv = reduce(self.proto)</div><div> File "/Users/mike/pypy-1.6/lib-python/2.7/copy_reg.py", line 70, in _reduce_ex</div><div> raise TypeError, "can't pickle %s objects" % base.__name__</div>
<div>TypeError: can't pickle numarray objects</div></div><div><br></div><div><br></div><div><br></div>