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

Function dictappend

numpy/f2py/auxfuncs.py:828–854  ·  view source on GitHub ↗
(rd, ar)

Source from the content-addressed store, hash-verified

826
827
828def dictappend(rd, ar):
829 if isinstance(ar, list):
830 for a in ar:
831 rd = dictappend(rd, a)
832 return rd
833 for k in ar.keys():
834 if k[0] == '_':
835 continue
836 if k in rd:
837 if isinstance(rd[k], str):
838 rd[k] = [rd[k]]
839 if isinstance(rd[k], list):
840 if isinstance(ar[k], list):
841 rd[k] = rd[k] + ar[k]
842 else:
843 rd[k].append(ar[k])
844 elif isinstance(rd[k], dict):
845 if isinstance(ar[k], dict):
846 if k == 'separatorsfor':
847 for k1 in ar[k].keys():
848 if k1 not in rd[k]:
849 rd[k][k1] = ar[k][k1]
850 else:
851 rd[k] = dictappend(rd[k], ar[k])
852 else:
853 rd[k] = ar[k]
854 return rd
855
856
857def applyrules(rules, d, var={}):

Callers 10

buildhooksFunction · 0.85
sign2mapFunction · 0.85
cb_sign2mapFunction · 0.85
common_sign2mapFunction · 0.85
buildusevarsFunction · 0.85
buildusevarFunction · 0.85
applyrulesFunction · 0.85
buildcallbackFunction · 0.85
buildmoduleFunction · 0.85
buildapiFunction · 0.85

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…