Although the pickle example is great for showing off the increased efficiency of pickle v3, numpy outright recommends against pickling numpy arrays etc. (they explain why to use .save instead here). I worry that people may internalize some of the examples here and end up pickling numpy objects. Furthermore, pickling numpy objects as well as most other things presents a special problem to data scientists etc. who are in the middle of migrating 2-to-3: pickle v2 and v3 are mutually incompatible, unless you explicitly request backwards compatibility.
If you're open to modifying that example's code, or adding an aside that mentions the risks of pickle for security and compatibility, it may be helpful to those reading.
Although the pickle example is great for showing off the increased efficiency of pickle v3, numpy outright recommends against pickling numpy arrays etc. (they explain why to use
.save
instead here). I worry that people may internalize some of the examples here and end up pickling numpy objects. Furthermore, pickling numpy objects as well as most other things presents a special problem to data scientists etc. who are in the middle of migrating 2-to-3: pickle v2 and v3 are mutually incompatible, unless you explicitly request backwards compatibility.If you're open to modifying that example's code, or adding an aside that mentions the risks of pickle for security and compatibility, it may be helpful to those reading.
I really appreciate you preparing this document!