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

Function process_str

numpy/f2py/_src_pyf.py:191–208  ·  view source on GitHub ↗
(allstr)

Source from the content-addressed store, hash-verified

189 return newstr
190
191def process_str(allstr):
192 newstr = allstr
193 writestr = ''
194
195 struct = parse_structure(newstr)
196
197 oldend = 0
198 names = {}
199 names.update(_special_names)
200 for sub in struct:
201 cleanedstr, defs = find_and_remove_repl_patterns(newstr[oldend:sub[0]])
202 writestr += cleanedstr
203 names.update(defs)
204 writestr += expand_sub(newstr[sub[0]:sub[1]], names)
205 oldend = sub[1]
206 writestr += newstr[oldend:]
207
208 return writestr
209
210
211include_src_re = re.compile(r"(\n|\A)\s*include\s*['\"](?P<name>[\w\d./\\]+\.src)[&#x27;\"]", re.I)

Callers 2

test_from_templateFunction · 0.90
process_fileFunction · 0.70

Calls 4

expand_subFunction · 0.85
updateMethod · 0.80
parse_structureFunction · 0.70

Tested by 1

test_from_templateFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…