[pypy-dev] pickle numpy array from pypy to cpython?
matti picus
matti.picus at gmail.com
Fri Jun 24 16:21:26 EDT 2016
The first step would be to pickle the same dtype/shape/data ndarray once from numpy and again from _numpypy, and to compare the binary result. The only difference should be the class name, if the difference goes deeper that difference must be fixed. Then it it just a matter of patching pickle.py to use the desired class instead of the class name encoded into the pickled binary result.
Matti
> On 24 Jun 2016, at 10:43 PM, Eli Stevens (Gmail) <wickedgrey at gmail.com> wrote:
>
> Yeah, looks like that's still the case:
>
>>>>> z = np.zeros((2,3), dtype=np.float32)
>>>>> z.tofile
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: 'numpy.ndarray' object has no attribute 'tofile'
>
> What would it take to get cross-interpreter numpy array pickles working?
>
> Thanks,
> Eli
>
>
More information about the pypy-dev
mailing list