diff options
author | David Freese <dfreese@stanford.edu> | 2017-10-24 06:05:05 -0700 |
---|---|---|
committer | David Freese <dfreese@stanford.edu> | 2017-10-24 10:37:26 -0700 |
commit | 0efac01e2b9d9ce40e508f14a1a5d53fef62fbc8 (patch) | |
tree | 4d310db4b312b397a9909be0e2e9cb56ddfd49e5 /numpy/lib/npyio.py | |
parent | 354b8e70c92416a066727b4c9dc4275a5535ae59 (diff) | |
download | numpy-0efac01e2b9d9ce40e508f14a1a5d53fef62fbc8.tar.gz |
DOC: Clarify behavior of genfromtxt names field
The documentation on the name parameter for npyio.genfromtxt uses the phrase
"valid line" which doesn't completely describe it's behavior. This updates the
documentation on the names field to indicate the first line, with or without a
comment delimeter, will be taken for the names field.
fixes #9878
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index d2b8fb4ab..6de5940d7 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -1418,11 +1418,12 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None, Which columns to read, with 0 being the first. For example, ``usecols = (1, 4, 5)`` will extract the 2nd, 5th and 6th columns. names : {None, True, str, sequence}, optional - If `names` is True, the field names are read from the first valid line - after the first `skip_header` lines. - If `names` is a sequence or a single-string of comma-separated names, - the names will be used to define the field names in a structured dtype. - If `names` is None, the names of the dtype fields will be used, if any. + If `names` is True, the field names are read from the first line after + the first `skip_header` lines. This line can optionally be proceeded + by a comment delimeter. If `names` is a sequence or a single-string of + comma-separated names, the names will be used to define the field names + in a structured dtype. If `names` is None, the names of the dtype + fields will be used, if any. excludelist : sequence, optional A list of names to exclude. This list is appended to the default list ['return','file','print']. Excluded names are appended an underscore: |