MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / name_map

Function name_map

geometry.py:471–481  ·  view source on GitHub ↗
(struct: Any)

Source from the content-addressed store, hash-verified

469
470
471def name_map(struct: Any) -> Any:
472 if isinstance(struct, list):
473 return [name_map(x) for x in struct]
474 elif isinstance(struct, tuple):
475 return tuple([name_map(x) for x in struct])
476 elif isinstance(struct, set):
477 return set([name_map(x) for x in struct])
478 elif isinstance(struct, dict):
479 return {name_map(x): name_map(y) for x, y in struct.items()}
480 else:
481 return getattr(struct, 'name', '')
482
483
484class Angle(Node):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected