-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ENH: Add __f2py_numpy_version__
attribute to Fortran modules.
#16594
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
Conversation
The purpose of this PR is to gracefully handle situations like this: scipy/scipy#9658 If we know the version of NumPy used for compilation (not the imported one) users of f2py (e.g. SciPy) can gracefully turn off workarounds for known f2py bugs, if we know the workaround to otherwise be detrimental. Not having the attribute |
Ping @pv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. You can add a test, maybe here: https://github.com/numpy/numpy/blob/master/numpy/f2py/tests/test_regression.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @pv any last comments?
c7a2cf9
to
e574f1e
Compare
e574f1e
to
908d865
Compare
Finally it is green again 😅 |
Seems like everyone was happy with this decision, and the code looks good to me as well. Thanks @sturlamolden. |
__f2py_numpy_version__
attribute to Fortran modules.
The Fortran module now reports the version of NumPy associated with the f2py used for compilation. Closes gh-16525.