diff options
author | Pearu Peterson <pearu.peterson@gmail.com> | 2011-02-26 19:20:52 +0200 |
---|---|---|
committer | Pearu Peterson <pearu.peterson@gmail.com> | 2011-02-26 19:20:52 +0200 |
commit | d7ea62c3153fcf51e358b93a6aeb2be4f74c08e5 (patch) | |
tree | d0ff7fbb64f88d16b13ac62810956f54592894ff /numpy/f2py/auxfuncs.py | |
parent | cafd2df2336258b6a107d827f60b89d20a967653 (diff) | |
download | numpy-d7ea62c3153fcf51e358b93a6aeb2be4f74c08e5.tar.gz |
WIP: implemented assumed shape support for Fortran subroutines.
Diffstat (limited to 'numpy/f2py/auxfuncs.py')
-rw-r--r-- | numpy/f2py/auxfuncs.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/f2py/auxfuncs.py b/numpy/f2py/auxfuncs.py index ac95669b7..a12d92b7e 100644 --- a/numpy/f2py/auxfuncs.py +++ b/numpy/f2py/auxfuncs.py @@ -206,6 +206,21 @@ def isfunction_wrap(rout): def issubroutine(rout): return ('block' in rout and 'subroutine'==rout['block']) +def issubroutine_wrap(rout): + if isintent_c(rout): + return 0 + return issubroutine(rout) and hasassumedshape(rout) + +def hasassumedshape(rout): + if rout.get('hasassumedshape'): + return True + for a in rout['args']: + for d in rout['vars'].get(a,{}).get('dimension',[]): + if d==':': + rout['hasassumedshape'] = True + return True + return False + def isroutine(rout): return isfunction(rout) or issubroutine(rout) |