MCPcopy Create free account
hub / github.com/PeizeSun/TransTrack / _max_by_axis

Function _max_by_axis

util/misc.py:300–306  ·  view source on GitHub ↗
(the_list)

Source from the content-addressed store, hash-verified

298
299
300def _max_by_axis(the_list):
301 # type: (List[List[int]]) -> List[int]
302 maxes = the_list[0]
303 for sublist in the_list[1:]:
304 for index, item in enumerate(sublist):
305 maxes[index] = max(maxes[index], item)
306 return maxes
307
308
309def nested_tensor_from_tensor_list(tensor_list: List[Tensor]):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected