Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/zai-org/CodeGeeX
/ switch
Function
switch
codegeex/megatron/code_generation_utils.py:900–902 ·
view source on GitHub ↗
(val1, val2, boolean)
Source
from the content-addressed store, hash-verified
898
899
900
def
switch(val1, val2, boolean):
901
boolean = boolean.type_as(val1)
902
return
(1 - boolean) * val1 + boolean * val2
903
904
905
def
sample_sequence_batch(
Callers
1
sample_sequence_batch
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected