diff options
author | Rohit Goswami <rog32@hi.is> | 2023-04-17 00:41:10 +0000 |
---|---|---|
committer | Rohit Goswami <rog32@hi.is> | 2023-04-17 00:41:10 +0000 |
commit | 2ac450e5c0c0ca47040c2fd4147f45f42010510c (patch) | |
tree | 0cdf9ccdc6991575b4ccc2615290a396a19eb528 /numpy/f2py/func2subr.py | |
parent | 6fe296cff6b31747232326511a42599e0a354ee3 (diff) | |
download | numpy-2ac450e5c0c0ca47040c2fd4147f45f42010510c.tar.gz |
BUG: Ensure function wrappers have consistent args
Diffstat (limited to 'numpy/f2py/func2subr.py')
-rw-r--r-- | numpy/f2py/func2subr.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/f2py/func2subr.py b/numpy/f2py/func2subr.py index 2a05f065b..cc3cdc5b4 100644 --- a/numpy/f2py/func2subr.py +++ b/numpy/f2py/func2subr.py @@ -119,6 +119,12 @@ def createfuncwrapper(rout, signature=0): sargs = ', '.join(args) if f90mode: + # gh-23598 fix warning + # Essentially, this gets called again with modules where the name of the + # function is added to the arguments, which is not required, and removed + sargs = sargs.replace(f"{name}, ", '') + args = [arg for arg in args if arg != name] + rout['args'] = args add('subroutine f2pywrap_%s_%s (%s)' % (rout['modulename'], name, sargs)) if not signature: |