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

Function default

sat/sgm/util.py:233–236  ·  view source on GitHub ↗
(val, d)

Source from the content-addressed store, hash-verified

231
232
233def default(val, d):
234 if exists(val):
235 return val
236 return d() if isfunction(d) else d
237
238
239def mean_flat(tensor):

Callers 3

__init__Method · 0.90
decode_first_stageMethod · 0.90
encode_first_stageMethod · 0.90

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected