summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorrgommers <ralf.gommers@googlemail.com>2011-03-01 10:32:50 +0800
committerrgommers <ralf.gommers@googlemail.com>2011-03-01 10:32:50 +0800
commit4eebdf9c2576bfa66b30f93ce3179e68fab1bb93 (patch)
treede1d40f531c3362409d25d00dd41c5738db7f8fa /numpy/lib/npyio.py
parentc50af53f0edbb3e059c21274dbd9204f637d677f (diff)
downloadnumpy-4eebdf9c2576bfa66b30f93ce3179e68fab1bb93.tar.gz
BUG: correct file name in fromregex.
Thanks to Mattieu Brucher for reporting.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index 3f4db4593..1f2fc714a 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -1028,7 +1028,7 @@ def fromregex(file, regexp, dtype):
return output
finally:
if own_fh:
- fh.close()
+ file.close()
@@ -1502,7 +1502,7 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
if _[0] > nbrows + skip_header])
invalid = invalid[:nbinvalid - nbinvalid_skipped]
skip_footer -= nbinvalid_skipped
-#
+#
# nbrows -= skip_footer
# errmsg = [template % (i, nb)
# for (i, nb) in invalid if i < nbrows]