Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

BUG: fix np.genfromtxt for all columns in usecols, in different order.#28802

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
HenriqueLLuz wants to merge2 commits intonumpy:main
base:main
Choose a base branch
Loading
fromHenriqueLLuz:bug-fix

Conversation

HenriqueLLuz
Copy link

Resolved an issue in genfromtxt where it produced incorrect results whenever it was used all columns in usecols and they were in an order different than the displayed in the first line. Added a test to ensure accurate assignment of columns names to the respective columns. (fixes#28225).

The issue arose when usecols had all the column names but in different order than the one in the original text. In this case, usecols was not being reordered before assigning data, resulting in data being assign to the wrong column. The reordering only happened when the number of columns of the original text was more than the length of usecols. I just made it to reorder when they have same length too.

Resolved an issue in genfromtxt where it produced incorrect resultswhenever it was used all columns in usecols and they were in an orderdifferent than the displayed in the first line. Added a test to ensureaccurate assignment of columns names to the respective columns.(fixesnumpy#28225)
@seberg
Copy link
Member

@HenriqueLLuz thanks, sorry that nobody took a look. I have to browse through to make sure this covers everything, but LGTM on first sight.

Could you add a brief release note (I guess withchange, seedoc/release/upcoming_changes/README.rst)? Feels like a big enough fix that it could cause confusion in principle.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
Status: Awaiting a code review
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

BUG: numpy.genfromtxt wrong column assignment
2 participants
@HenriqueLLuz@seberg

[8]ページ先頭

©2009-2025 Movatter.jp