8000 savetxt ticket #1236 by pletnes · Pull Request #125 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

savetxt ticket #1236 #125

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

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Ticket 1793 again - removed use of the .format; using % operator inst…
…ead. also, removed an unneeded line of code in corresponding unit test.
  • Loading branch information
pletnes committed Jul 29, 2011
commit 559399d013d0ff072f76e31afb4ac28e87c2e19e
2 changes: 1 addition & 1 deletion numpy/lib/npyio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
# return an empty array if the datafile is empty
first_line = ''
first_values = []
warnings.warn('genfromtxt: Empty input file: "{0}"'.format(fname))
warnings.warn('genfromtxt: Empty input file: "%s"' % fname)

# Should we take the first values as names ?
if names is True:
Expand Down
3 changes: 1 addition & 2 deletions numpy/lib/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,7 @@ def test_empty_file(self):
"Test that an empty file raises the proper exception"
data = StringIO()
test = np.genfromtxt(data)
ctrl = np.array([])
assert_equal(test, ctrl)
assert_equal(test, np.array([]))

def test_fancy_dtype_alt(self):
"Check that a nested dtype isn't MIA"
Expand Down
0