Skip to content

BUG: Fix data stmt handling for complex values in f2py - #23282

Merged
charris merged 5 commits into
numpy:mainfrom
HaoZeke:fixDataStmtHandlingF2PY
Sep 13, 2023
Merged

charris merged 5 commits into
numpy:mainfrom
HaoZeke:fixDataStmtHandlingF2PY

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Feb 26, 2023 •

Copy link
Copy Markdown
Member

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

HaoZeke commented Feb 26, 2023

Copy link
Copy Markdown
Member Author

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

Comment thread numpy/f2py/crackfortran.py Outdated
Comment thread numpy/f2py/crackfortran.py Outdated
@mattip mattip added the triage review Issue/PR to be discussed at the next triage meeting label Feb 27, 2023
@HaoZeke

HaoZeke commented Mar 4, 2023

Copy link
Copy Markdown
Member Author

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 force-pushed the fixDataStmtHandlingF2PY branch from 9b1ca14 to a97f209 Compare April 15, 2023 19:02
@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

mattip commented Jul 26, 2023

Copy link
Copy Markdown
Member

@melissawm @HaoZeke any news here?

@HaoZeke

HaoZeke commented Jul 31, 2023

Copy link
Copy Markdown
Member Author

@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
@charris

charris commented Sep 13, 2023

Copy link
Copy Markdown
Member

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