summaryrefslogtreecommitdiff
path: root/numpy/f2py/auxfuncs.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/auxfuncs.py')
-rw-r--r--numpy/f2py/auxfuncs.py15
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)