diff options
author | mattip <matti.picus@gmail.com> | 2018-11-20 11:13:01 -0800 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-05-23 07:17:26 +0300 |
commit | 113560b576c57fcbaa758cb8e7b12b7f19f51c2f (patch) | |
tree | 6847da59fe339f202f6aafe134a333824867233f /numpy/lib/format.py | |
parent | 9b89cfd2f0364151cc6a23806b2b03bc09e16035 (diff) | |
download | numpy-113560b576c57fcbaa758cb8e7b12b7f19f51c2f.tar.gz |
ENH: always use zip64, upgrade pickle protocol to 3
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r-- | numpy/lib/format.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py index cd8700051..a14f3e4b2 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -650,14 +650,13 @@ def write_array(fp, array, version=None, allow_pickle=True, pickle_kwargs=None): if array.dtype.hasobject: # We contain Python objects so we cannot write out the data - # directly. Instead, we will pickle it out with version 2 of the - # pickle protocol. + # directly. Instead, we will pickle it out if not allow_pickle: raise ValueError("Object arrays cannot be saved when " "allow_pickle=False") if pickle_kwargs is None: pickle_kwargs = {} - pickle.dump(array, fp, protocol=2, **pickle_kwargs) + pickle.dump(array, fp, protocol=3, **pickle_kwargs) elif array.flags.f_contiguous and not array.flags.c_contiguous: if isfileobj(fp): array.T.tofile(fp) |