Repository navigation
ENH: Add __f2py_numpy_version__ attribute to Fortran modules. - #16594
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 |
pv
left a comment
There was a problem hiding this comment.
LGTM. You can add a test, maybe here: https://github.com/numpy/numpy/blob/master/numpy/f2py/tests/test_regression.py
|
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.