How does Python 3 know how to pickle extension types, especially Numpy arrays?
Numpy arrays, being extension types (aka defined using in extensions the C API), declare additional fields outside the scope of the Python interpreter (for example the data attribute, which is a Buffer Structure , as documented in Numpy's array interface . To be able to serialize it, Python 2 used to use the __reduce__ function as part of the pickle protocol, as stated in the doc , and explained here . But, even if __reduce__ still exists in Python 3, the Pickle protocol section (and Pickling and unpickling extension types a fortiori) was removed from the doc, so it is unclear what does what.