MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / list_cut_average

Function list_cut_average

text2motion/utils/plot_script.py:12–23  ·  view source on GitHub ↗
(ll, intervals)

Source from the content-addressed store, hash-verified

10
11
12def list_cut_average(ll, intervals):
13 if intervals == 1:
14 return ll
15
16 bins = math.ceil(len(ll) * 1.0 / intervals)
17 ll_new = []
18 for i in range(bins):
19 l_low = intervals * i
20 l_high = l_low + intervals
21 l_high = l_high if l_high < len(ll) else len(ll)
22 ll_new.append(np.mean(ll[l_low:l_high]))
23 return ll_new
24
25
26def plot_3d_motion(save_path, kinematic_tree, joints, title, figsize=(10, 10), fps=120, radius=4):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected