Skip to content

BUG: Ensure correct behavior for rows ending in delimiter in loadtxt#22836

Merged
rossbar merged 1 commit intonumpy:mainfrom
seberg:issue-22833
Dec 19, 2022
Merged

BUG: Ensure correct behavior for rows ending in delimiter in loadtxt#22836
rossbar merged 1 commit intonumpy:mainfrom
seberg:issue-22833

Conversation

@seberg
Copy link
Copy Markdown
Member

@seberg seberg commented Dec 19, 2022

If a row ends in a delimiter, add_fields can be called twice without any field actually being parsed. This causes issues with the field buffer setup.
Basically, I tried to be too smart, and now it needs a small fixup...

closes gh-22833

If a row ends in a delimiter, `add_fields` can be called twice without
any field actually being parsed.  This causes issues with the field
buffer setup.
Basically, I tried to be too smart, and now it needs a small fixup...

closes numpygh-22833
@charris charris added 00 - Bug 09 - Backport-Candidate PRs tagged should be backported labels Dec 19, 2022
@charris charris added this to the 1.24.1 release milestone Dec 19, 2022
Copy link
Copy Markdown
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks @seberg

@rossbar rossbar merged commit 5e0ed03 into numpy:main Dec 19, 2022
@seberg seberg deleted the issue-22833 branch December 19, 2022 18:48
charris pushed a commit to charris/numpy that referenced this pull request Dec 21, 2022
…umpy#22836)

If a row ends in a delimiter, `add_fields` can be called twice without
any field actually being parsed.  This causes issues with the field
buffer setup.

closes numpygh-22833
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Dec 21, 2022
@charris charris removed this from the 1.24.1 release milestone Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: numpy.loadtxt crash for texts of specific length an trailing whitespace

3 participants