summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-10-06 14:34:38 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-10-06 14:34:38 -0600
commit6350694d97297e3f1ca7dc7b3727f47c436861d8 (patch)
tree0cc15d831f9794703d146560b07e871671f0f8b0 /numpy/lib
parent1225aef37298ec82048d0828f6cb7e0be8ed58cc (diff)
parentcad4c90de5292023358e31e82378815720c99c47 (diff)
downloadnumpy-6350694d97297e3f1ca7dc7b3727f47c436861d8.tar.gz
Merge pull request #6406 from charris/update-gh-6310
DOC: Update gh-6310: Update docs for numpy.genfromtxt.
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/npyio.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index 12052a08e..640f4fa32 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -1271,10 +1271,11 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
Parameters
----------
- fname : file or str
- File, filename, or generator to read. If the filename extension is
- `.gz` or `.bz2`, the file is first decompressed. Note that
- generators must return byte strings in Python 3k.
+ fname : file, str, list of str, generator
+ File, filename, list, or generator to read. If the filename
+ extension is `.gz` or `.bz2`, the file is first decompressed. Mote
+ that generators must return byte strings in Python 3k. The strings
+ in a list or produced by a generator are treated as lines.
dtype : dtype, optional
Data type of the resulting array.
If None, the dtypes will be determined by the contents of each
@@ -1455,8 +1456,8 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
fhd = iter(fname)
except TypeError:
raise TypeError(
- "fname must be a string, filehandle, or generator. "
- "(got %s instead)" % type(fname))
+ "fname must be a string, filehandle, list of strings, "
+ "or generator. Got %s instead." % type(fname))
split_line = LineSplitter(delimiter=delimiter, comments=comments,
autostrip=autostrip)._handyman