8000 BUG: fix np.save issue with python 2.7.5 by charris · Pull Request #10539 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: fix np.save issue with python 2.7.5 #10539

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
Feb 7, 2018
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
minor fix for python3 compatibility
  • Loading branch information
pnbat authored and charris committed Feb 7, 2018
commit 9bd132fa34f87c94613b7ee014bc1c2840b1b4b5
4 changes: 2 additions & 2 deletions numpy/lib/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ def _filter_header(s):
tokens = []
last_token_was_number = False
# adding newline as python 2.7.5 workaround
s += "\n"
for token in tokenize.generate_tokens(StringIO(asstr(s)).readline):
string = asstr(s) + "\n"
for token in tokenize.generate_tokens(StringIO(string).readline):
token_type = token[0]
token_string = token[1]
if (last_token_was_number and
Expand Down
0