MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / clean_fn

Function clean_fn

util/smplx/tools/clean_ch.py:30–45  ·  view source on GitHub ↗
(fn, output_folder='output')

Source from the content-addressed store, hash-verified

28
29
30def clean_fn(fn, output_folder='output'):
31 with open(fn, 'rb') as body_file:
32 body_data = pickle.load(body_file)
33
34 output_dict = {}
35 for key, data in body_data.iteritems():
36 if 'chumpy' in str(type(data)):
37 output_dict[key] = np.array(data)
38 else:
39 output_dict[key] = data
40
41 out_fn = osp.split(fn)[1]
42
43 out_path = osp.join(output_folder, out_fn)
44 with open(out_path, 'wb') as out_file:
45 pickle.dump(output_dict, out_file)
46
47
48if __name__ == '__main__':

Callers 1

clean_ch.pyFile · 0.85

Calls 2

loadMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected