MCPcopy Create free account
hub / github.com/VAST-AI-Research/TriplaneGaussian / wrapper

Function wrapper

tgs/utils/misc.py:63–71  ·  view source on GitHub ↗
(vars, *args, **kwargs)

Source from the content-addressed store, hash-verified

61# convert a function into recursive style to handle nested dict/list/tuple variables
62def make_recursive_func(func):
63 def wrapper(vars, *args, **kwargs):
64 if isinstance(vars, list):
65 return [wrapper(x, *args, **kwargs) for x in vars]
66 elif isinstance(vars, tuple):
67 return tuple([wrapper(x, *args, **kwargs) for x in vars])
68 elif isinstance(vars, dict):
69 return {k: wrapper(v, *args, **kwargs) for k, v in vars.items()}
70 else:
71 return func(vars, *args, **kwargs)
72
73 return wrapper
74

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected