MCPcopy Create free account
hub / github.com/MotrixLab/insactor / multi_apply

Function multi_apply

diffplanner/utils/misc.py:6–9  ·  view source on GitHub ↗
(func, *args, **kwargs)

Source from the content-addressed store, hash-verified

4
5
6def multi_apply(func, *args, **kwargs):
7 pfunc = partial(func, **kwargs) if kwargs else func
8 map_results = map(pfunc, *args)
9 return tuple(map(list, zip(*map_results)))
10
11
12def torch_to_numpy(x):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected