MCPcopy Create free account
hub / github.com/open-mmlab/mmengine / cat

Method cat

tests/test_structures/test_instance_data.py:35–42  ·  view source on GitHub ↗
(tmp_objs)

Source from the content-addressed store, hash-verified

33
34 @staticmethod
35 def cat(tmp_objs):
36 assert all(isinstance(results, TmpObject) for results in tmp_objs)
37 if len(tmp_objs) == 1:
38 return tmp_objs[0]
39 tmp_list = [tmp_obj.tmp for tmp_obj in tmp_objs]
40 tmp_list = list(itertools.chain(*tmp_list))
41 new_data = TmpObject(tmp_list)
42 return new_data
43
44 def __repr__(self):
45 return str(self.tmp)

Callers 1

test_catMethod · 0.45

Calls 1

TmpObjectClass · 0.85

Tested by

no test coverage detected