From 82d8d97ac30e20f9ae605df228bee43d89ef72a2 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Sun, 2 May 2010 20:02:14 +0000 Subject: BUG: loadtxt should handle universal newlines. --- numpy/lib/npyio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/npyio.py') diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index feb336dcc..7a6e0238a 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -584,7 +584,7 @@ def loadtxt(fname, dtype=float, comments='#', delimiter=None, import bz2 fh = bz2.BZ2File(fname) else: - fh = file(fname) + fh = file(fname, 'U') elif hasattr(fname, 'readline'): fh = fname else: -- cgit v1.2.1