MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / cast_tuple

Function cast_tuple

sat/sgm/modules/autoencoding/magvit2_pytorch.py:89–90  ·  view source on GitHub ↗
(t, length=1)

Source from the content-addressed store, hash-verified

87
88
89def cast_tuple(t, length=1):
90 return t if isinstance(t, tuple) else ((t,) * length)
91
92
93# tensor helpers

Callers 5

SameConv2dFunction · 0.70
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected