summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-04-15 08:35:10 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-04-15 08:35:10 -0700
commit9361471ebf49d31761e8ed9d7dc6512abe3241a9 (patch)
tree8e01d8226aa0c6073a9c3cf8fbf9fdf88a175d5b /numpy/lib/npyio.py
parenta196d789fbb8e72672c73ffcf99c687b5fd3ec3d (diff)
parentc6de09799decbb22bb2d7a44036f53c30356edda (diff)
downloadnumpy-9361471ebf49d31761e8ed9d7dc6512abe3241a9.tar.gz
Merge pull request #3249 from charris/2to3-apply-next-fixer
2to3: Apply next fixer.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index 733868780..2154acdce 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -785,14 +785,14 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None,
# Skip the first `skiprows` lines
for i in range(skiprows):
- fh.next()
+ next(fh)
# Read until we find a line with some values, and use
# it to estimate the number of columns, N.
first_vals = None
try:
while not first_vals:
- first_line = fh.next()
+ first_line = next(fh)
first_vals = split_line(first_line)
except StopIteration:
# End of lines reached
@@ -1344,13 +1344,13 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
skip_header = skiprows
# Skip the first `skip_header` rows
for i in range(skip_header):
- fhd.next()
+ next(fhd)
# Keep on until we find the first valid values
first_values = None
try:
while not first_values:
- first_line = fhd.next()
+ first_line = next(fhd)
if names is True:
if comments in first_line:
first_line = asbytes('').join(first_line.split(comments)[1:])