8000 DOC: Update genfromtxt documentation by liang3zy22 · Pull Request #25813 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: Update genfromtxt documentation #25813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions numpy/lib/_npyio_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1769,10 +1769,11 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
names : {None, True, str, sequence}, optional
If `names` is True, the field names are read from the first line after
the first `skip_header` lines. This line can optionally be preceded
by a comment delimiter. 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.
by a comment delimiter. Any content before the comment delimiter is
discarded. 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 with an
Expand Down Expand Up @@ -1847,8 +1848,8 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
-----
* When spaces are used as delimiters, or when no delimiter has been given
as input, there should not be any missing data between two fields.
* When variables are named (either by a flexible dtype or with `names`),
there must not be any header in the file (else a ValueError
* When variables are named (either by a flexible dtype or with a `names`
sequence), there must not be any header in the file (else a ValueError
exception is raised).
* Individual values are not stripped of spaces by default.
When using a custom converter, make sure the function does remove spaces.
Expand Down
0