8000 ENH: Allow pickle with protocol 5 when higher is requested by jakirkham · Pull Request #16185 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Allow pickle with protocol 5 when higher is requested #16185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 12, 2020
Merged
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
8000
Diff view
Diff view
Prev Previous commit
Drop error for protocol's greater than 5
  • Loading branch information
jakirkham committed May 8, 2020
commit 387a95be01e667206c30ad18ce6dc258c0f5533f
7 changes: 1 addition & 6 deletions numpy/core/src/multiarray/methods.c
Original file line number Diff line number Diff line change
Expand Up @@ -1889,13 +1889,8 @@ array_reduce_ex(PyArrayObject *self, PyObject *args)
* method that involves using a temporary bytes allocation. */
return array_reduce_ex_regular(self, protocol);
}
else if (protocol >= 5) {
return array_reduce_ex_picklebuffer(self, protocol);
}
else {
PyErr_Format(PyExc_ValueError,
"__reduce_ex__ called with protocol > 5");
return NULL;
return array_reduce_ex_picklebuffer(self, protocol);
}
}

Expand Down
0