Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Infer return types for Fortran functions in f2py #23600

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

Merged
merged 7 commits into from
Apr 28, 2023

Conversation

HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Apr 16, 2023

Closes #23598.

@seberg
Copy link
Member

seberg commented Apr 18, 2023

This looks good, but I don't really know fortran. @melissawm could you have a brief look?

Should this be backported?

@HaoZeke HaoZeke requested a review from melissawm April 21, 2023 16:05
Copy link
Member

@melissawm melissawm left a comment

Choose a reason for hiding this comment

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

This looks good to me, @HaoZeke - thanks! I also checked against SciPy and it looks good.

@@ -4,6 +4,6 @@ SUBROUTINE FOO(N)
Cf2py integer optional,intent(in) :: n = 13
REAL A,X
COMMON /DATA/ A,X(3)
PRINT*, "IN FOO: N=",N," A=",A," X=[",X(1),X(2),X(3),"]"
C PRINT*, "IN FOO: N=",N," A=",A," X=[",X(1),X(2),X(3),"]"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we want to remove this line entirely?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack, sorry, didn't see this earlier, I'll open a general cleanup to make sure we have no print statements in the f2py tests this weekend.

@seberg
Copy link
Member

seberg commented Apr 21, 2023

Thanks, will just put it in tomorrow (or someone else please do)! I don't see an obvious reason for backport anywhere, but if there is, please label it.

@seberg
Copy link
Member

seberg commented Apr 28, 2023

Thanks again @HaoZeke.

@seberg seberg merged commit f983afd into numpy:main Apr 28, 2023
@HaoZeke HaoZeke deleted the f2pyFuncFix_23598 branch April 28, 2023 12:29
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 does not properly wrap functions
3 participants