Skip to content

BUG: Fix bug in parsing F77 style string arrays.#23470

Merged
charris merged 1 commit intonumpy:mainfrom
bobeldering:f2py-f77-array-parsing-fix
Apr 21, 2023
Merged

BUG: Fix bug in parsing F77 style string arrays.#23470
charris merged 1 commit intonumpy:mainfrom
bobeldering:f2py-f77-array-parsing-fix

Conversation

@bobeldering
Copy link
Copy Markdown
Contributor

Example problematic variable: CHARACTER WORDARR(3)*8

This would be wrapped by an array with shape (3, 8) and dtype |S1, instead of the desired shape (3,) and dtype |S8.
See #23356.

Example problematic variable: CHARACTER WORDARR(3)*8
This would be wrapped by an array with shape (3, 8) and dtype |S1,
instead of the desired shape (3,) and dtype |S8.
See numpy#23356.
@seberg
Copy link
Copy Markdown
Member

seberg commented Mar 27, 2023

@HaoZeke or @pearu could you have a look if this seems right? This seems to be a regression, so it might be nice to backport, but that means we will have to be careful.

EDIT: Note that there is some discussion in the issue gh-23356

Copy link
Copy Markdown
Member

@HaoZeke HaoZeke left a comment

Choose a reason for hiding this comment

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

I think this should be good to go in as is, since it doesn't seem to break anything. The current behavior makes sense in some respect, keeping everything S1 is simpler, though it is a breaking change from #19388 as discussed in the issue. @pearu would be the best person for this.

That being said, the change seems harmless enough and respects BC (compatible with 1.23) so perhaps we should go ahead and see if other issues crop up. If not, a backport would be nice too.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Apr 20, 2023
@charris charris merged commit 5a49413 into numpy:main Apr 21, 2023
@charris
Copy link
Copy Markdown
Member

charris commented Apr 21, 2023

Thanks @bobeldering .

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants