Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Adds document for default pickle protocol 4
  • Loading branch information
vxst committed May 16, 2024
commit 039538a842147262f69eb3d29366ba5b3c6e02ec
3 changes: 3 additions & 0 deletions doc/release/upcoming_changes/26388.performance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `numpy.save` now uses pickle protocol version 4 for saving arrays with
object dtype, which allows for pickle objects larger than 4GB and improves
saving speed by about 5% for large arrays.
2 changes: 1 addition & 1 deletion numpy/lib/_npyio_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ def save(file, arr, allow_pickle=True, fix_imports=True):
arbitrary code) and portability (pickled objects may not be loadable
on different Python installations, for example if the stored objects
require libraries that are not available, and not all pickled data is
compatible between Python 2 and Python 3).
compatible between different versions of Python).
Default: True
fix_imports : bool, optional
Only useful in forcing objects in object arrays on Python 3 to be
Expand Down