diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2020-06-18 07:42:40 -0400 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2020-06-18 07:42:40 -0400 |
commit | 431f0ef3800a5be5df24c3adeb84251ff144faf4 (patch) | |
tree | 660da8be5e87f2308f1c594c03b056ed0a95e8aa /numpy/lib/npyio.py | |
parent | fa1a3ecd22c849f9066e2b712cc6bb21c36e57ee (diff) | |
download | numpy-431f0ef3800a5be5df24c3adeb84251ff144faf4.tar.gz |
MAINT: lib: A few PEP-8 fixes.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index f138c4cca..6d6222d3e 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -784,6 +784,7 @@ def _getconv(dtype): else: return asstr + # amount of lines loadtxt reads in one chunk, can be overridden for testing _loadtxt_chunksize = 50000 @@ -1110,7 +1111,8 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, # End of lines reached first_line = '' first_vals = [] - warnings.warn('loadtxt: Empty input file: "%s"' % fname, stacklevel=2) + warnings.warn('loadtxt: Empty input file: "%s"' % fname, + stacklevel=2) N = len(usecols or first_vals) # Now that we know N, create the default converters list, and @@ -1134,8 +1136,9 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, # Unused converter specified continue if byte_converters: - # converters may use decode to workaround numpy's old behaviour, - # so encode the string again before passing to the user converter + # converters may use decode to workaround numpy's old + # behaviour, so encode the string again before passing to + # the user converter def tobytes_first(x, conv): if type(x) is bytes: return conv(x) |