summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-10-04 15:05:37 -0600
committerCharles Harris <charlesr.harris@gmail.com>2015-10-04 15:05:37 -0600
commitcad4c90de5292023358e31e82378815720c99c47 (patch)
tree27a07b4018a433f40117e814f3cbac2c53337d24 /doc/source
parentae2d0bb7c2d227e893195cc3e52477567781e2db (diff)
downloadnumpy-cad4c90de5292023358e31e82378815720c99c47.tar.gz
DOC: Cleanup genfromtxt documentation a bit.
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/user/basics.io.genfromtxt.rst22
1 files changed, 12 insertions, 10 deletions
diff --git a/doc/source/user/basics.io.genfromtxt.rst b/doc/source/user/basics.io.genfromtxt.rst
index 75ba8a11d..5c0e28e6f 100644
--- a/doc/source/user/basics.io.genfromtxt.rst
+++ b/doc/source/user/basics.io.genfromtxt.rst
@@ -27,17 +27,19 @@ Defining the input
==================
The only mandatory argument of :func:`~numpy.genfromtxt` is the source of
-the data. It can be a string corresponding to the name of a local or
-remote file, or a file-like object with a :meth:`read` method (such as an
-actual file or a :class:`StringIO.StringIO` object), a list of strings, or
-a generator. If the argument is the URL of a remote file, then the file
-is automatically downloaded to the current directory.
-
-The input file can be a text file or an archive. Currently, the function
+the data. It can be a string, a list of strings, or a generator. If a
+single string is provided, it is assumed to be the name of a local or
+remote file, or a open file-like object with a :meth:`read` method, for
+example, a file or :class:`StringIO.StringIO` object. If a list of strings
+or a generator returning strings is provided, each string is treated as one
+line in a file. When the URL of a remote file is passed, the file is
+automatically downloaded to the current directory and opened.
+
+Recognized file types are text files and archives. Currently, the function
recognizes :class:`gzip` and :class:`bz2` (`bzip2`) archives. The type of
-the archive is determined by examining the extension of the file: if the
-filename ends with ``'.gz'``, a :class:`gzip` archive is expected; if it
-ends with ``'bz2'``, a :class:`bzip2` archive is assumed.
+the archive is determined from the extension of the file: if the filename
+ends with ``'.gz'``, a :class:`gzip` archive is expected; if it ends with
+``'bz2'``, a :class:`bzip2` archive is assumed.