From 113560b576c57fcbaa758cb8e7b12b7f19f51c2f Mon Sep 17 00:00:00 2001 From: mattip Date: Tue, 20 Nov 2018 11:13:01 -0800 Subject: ENH: always use zip64, upgrade pickle protocol to 3 --- numpy/lib/format.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'numpy/lib/format.py') 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) -- cgit v1.2.1