MCPcopy Create free account
hub / github.com/numpy/numpy / _makenamedict

Function _makenamedict

numpy/lib/utils.py:454–471  ·  view source on GitHub ↗
(module='numpy')

Source from the content-addressed store, hash-verified

452# Traverse all module directories underneath globals
453# to see if something is defined
454def _makenamedict(module='numpy'):
455 module = __import__(module, globals(), locals(), [])
456 thedict = {module.__name__:module.__dict__}
457 dictlist = [module.__name__]
458 totraverse = [module.__dict__]
459 while True:
460 if len(totraverse) == 0:
461 break
462 thisdict = totraverse.pop(0)
463 for x in thisdict.keys():
464 if isinstance(thisdict[x], types.ModuleType):
465 modname = thisdict[x].__name__
466 if modname not in dictlist:
467 moddict = thisdict[x].__dict__
468 dictlist.append(modname)
469 totraverse.append(moddict)
470 thedict[modname] = moddict
471 return thedict, dictlist
472
473
474def _info(obj, output=None):

Callers 1

infoFunction · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected