8000 BUG: Changed dump(a, F) so it would close file by orbit-stabilizer · Pull Request #10055 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Changed dump(a, F) so it would close file #10055

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 4 commits into from
Nov 20, 2017
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
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove fix for binary files to save for another PR, fix whitespace
  • Loading branch information
eric-wieser authored Nov 19, 2017
commit 50f44e81e81631b5d0a939015b7da7de484a680e
4 changes: 2 additions & 2 deletions numpy/ma/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7818,7 +7818,7 @@ def dump(a, F):

"""
if not hasattr(F, 'readline'):
with open (F, 'wb') as F:
with open(F, 'w') as F:
pickle.dump(a, F)
else:
pickle.dump(a, F)
Expand Down Expand Up @@ -7861,7 +7861,7 @@ def load(F):

"""
if not hasattr(F, 'readline'):
with open (F, 'r') as F:
with open(F, 'r') as F:
pickle.load(F)
else:
pickle.load(F)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a regression - there needs to be a return here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expand Down
0