MCPcopy Index your code
hub / github.com/numpy/numpy / postcrack2

Function postcrack2

numpy/f2py/crackfortran.py:2005–2034  ·  view source on GitHub ↗
(block, tab='', param_map=None)

Source from the content-addressed store, hash-verified

2003
2004
2005def postcrack2(block, tab='', param_map=None):
2006 global f90modulevars
2007
2008 if not f90modulevars:
2009 return block
2010 if isinstance(block, list):
2011 ret = [postcrack2(g, tab=tab + '\t', param_map=param_map)
2012 for g in block]
2013 return ret
2014 setmesstext(block)
2015 outmess(f"{tab}Block: {block['name']}\n", 0)
2016
2017 if param_map is None:
2018 param_map = get_useparameters(block)
2019
2020 if param_map is not None and 'vars' in block:
2021 vars = block['vars']
2022 for n in list(vars.keys()):
2023 var = vars[n]
2024 if 'kindselector' in var:
2025 kind = var['kindselector']
2026 if 'kind' in kind:
2027 val = kind['kind']
2028 if val in param_map:
2029 kind['kind'] = param_map[val]
2030 new_body = [postcrack2(b, tab=tab + '\t', param_map=param_map)
2031 for b in block['body']]
2032 block['body'] = new_body
2033
2034 return block
2035
2036
2037def postcrack(block, args=None, tab=''):

Callers 1

crackfortranFunction · 0.85

Calls 4

setmesstextFunction · 0.85
get_useparametersFunction · 0.85
outmessFunction · 0.70
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…