Skip to content
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

BUG: Fix DATA statements for f2py #24840

Merged
merged 10 commits into from Oct 1, 2023

Conversation

charris
Copy link
Member

@charris charris commented Oct 1, 2023

Backport of #24778.

Closes #24746. Not a very elegant solution, but short of reworking the parser completely, probably the best which can be done for now.

There are two bugs which are fixed by this, the first relates to an edge case in F77, and the second is to handle multi-line data statement definitions which may or may not have comments.

For the second part, the "fix" is to ignore it completely, since anyway the data statements get their value from the Fortran execution, and are therefore useless from a bindings perspective.

The first case likewise is a "fallback" mechanism which will work for statements without declared (or inferred) types (only shows up in F77).

A more full discussion is on the issue, #24746.

@charris charris added this to the 1.26.1 release milestone Oct 1, 2023
@charris charris changed the title Backport 24778 BUG: Fix DATA statements for f2py Oct 1, 2023
@charris charris merged commit f75cf1d into numpy:maintenance/1.26.x Oct 1, 2023
54 checks passed
@charris charris deleted the backport-24778 branch October 1, 2023 17:33
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.

None yet

2 participants