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 stmt handling for complex values in f2py #23282

Merged
merged 5 commits into from
Sep 13, 2023

Conversation

HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Feb 26, 2023

Closes #23276. I also couldn't resist changing the variable names a bit for posterity.

The crux of the fix is in e12392d that the truncation is wrong for COMPLEX types, so we check for them and continue and uses regular expressions to capture the COMPLEX data correctly. The other commits are cleanups and tests.

@HaoZeke
Copy link
Member Author

HaoZeke commented Feb 26, 2023

Build failure seems to be unrelated (sudo apt timeout for gfortran on Travis CI)

numpy/f2py/crackfortran.py Outdated Show resolved Hide resolved
numpy/f2py/crackfortran.py Outdated Show resolved Hide resolved
@mattip mattip added the triage review Issue/PR to be discussed at the next triage meeting label Feb 27, 2023
@HaoZeke
Copy link
Member Author

HaoZeke commented Mar 4, 2023

I've decided to rework this, I'll extract the fix (and update it) with the original variables and open a new PR with the renamed variables.

@HaoZeke HaoZeke requested a review from melissawm April 21, 2023 16:07
@mattip mattip removed the triage review Issue/PR to be discussed at the next triage meeting label Jul 26, 2023
@mattip
Copy link
Member

mattip commented Jul 26, 2023

@melissawm @HaoZeke any news here?

@HaoZeke
Copy link
Member Author

HaoZeke commented Jul 31, 2023

@melissawm @HaoZeke any news here?

I reworked it within the PR itself (with the force push) I think it should be good to go.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Sep 6, 2023
@charris charris added this to the 1.26.1 release milestone Sep 6, 2023
@charris charris merged commit 0df1365 into numpy:main Sep 13, 2023
57 checks passed
@charris
Copy link
Member

charris commented Sep 13, 2023

Thanks Rohit.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Sep 13, 2023
@charris charris removed this from the 1.26.1 release milestone Sep 13, 2023
@HaoZeke HaoZeke deleted the fixDataStmtHandlingF2PY branch September 14, 2023 03:56
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.

BUG: f2py data statement not parsed correctly for arrays
3 participants