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

Function findcommonblocks

numpy/f2py/common_rules.py:20–37  ·  view source on GitHub ↗
(block, top=1)

Source from the content-addressed store, hash-verified

18
19
20def findcommonblocks(block, top=1):
21 ret = []
22 if hascommon(block):
23 for key, value in block['common'].items():
24 vars_ = {v: block['vars'][v] for v in value}
25 ret.append((key, value, vars_))
26 elif hasbody(block):
27 for b in block['body']:
28 ret = ret + findcommonblocks(b, 0)
29 if top:
30 tret = []
31 names = []
32 for t in ret:
33 if t[0] not in names:
34 names.append(t[0])
35 tret.append(t)
36 return tret
37 return ret
38
39
40def buildhooks(m):

Callers 1

buildhooksFunction · 0.85

Calls 3

hascommonFunction · 0.85
hasbodyFunction · 0.85
itemsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…