From d7ea62c3153fcf51e358b93a6aeb2be4f74c08e5 Mon Sep 17 00:00:00 2001 From: Pearu Peterson Date: Sat, 26 Feb 2011 19:20:52 +0200 Subject: WIP: implemented assumed shape support for Fortran subroutines. --- numpy/f2py/auxfuncs.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'numpy/f2py/auxfuncs.py') 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) -- cgit v1.2.1