diff options
| author | Sebastian Berg <sebastianb@nvidia.com> | 2023-04-28 13:45:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-28 13:45:35 +0200 |
| commit | f983afd70046e807dd61962800ce147f42ccc457 (patch) | |
| tree | 72d84a3a9798df372d7101380985f4269161c6dc /numpy/f2py/func2subr.py | |
| parent | 30c047cdb2e0c0b233e5dc3b61c081ce1f6df3d3 (diff) | |
| parent | b4f0e4122e83115d99de849fcfc4fd1fc8b8f65d (diff) | |
| download | numpy-f983afd70046e807dd61962800ce147f42ccc457.tar.gz | |
Merge pull request #23600 from HaoZeke/f2pyFuncFix_23598
BUG: Infer return types for Fortran functions in `f2py`
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: |
