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

Function unique_key

numpy/f2py/_src_pyf.py:114–125  ·  view source on GitHub ↗

Obtain a unique key given a dictionary.

(adict)

Source from the content-addressed store, hash-verified

112 return ','.join(l)
113
114def unique_key(adict):
115 """ Obtain a unique key given a dictionary."""
116 allkeys = list(adict.keys())
117 done = False
118 n = 1
119 while not done:
120 newkey = f'__l{n}'
121 if newkey in allkeys:
122 n += 1
123 else:
124 done = True
125 return newkey
126
127
128template_name_re = re.compile(r'\A\s*(\w[\w\d]*)\s*\Z')

Callers 2

find_repl_patternsFunction · 0.70
listreplFunction · 0.70

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…