Skip to content

Commit 385328b

Browse files
Merge pull request jax-ml#25179 from rajasekharporeddy:lax_switch
PiperOrigin-RevId: 702018052
2 parents 784ebea + bbc4a20 commit 385328b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

jax/_src/lax/control_flow/conditionals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def switch(index, branches, *operands):
8787
Args:
8888
index: Integer scalar type, indicating which branch function to apply.
8989
branches: Sequence of functions (A -> B) to be applied based on ``index``.
90+
All branches must return the same output structure.
9091
operands: Operands (A) input to whichever branch is applied.
9192
9293
Returns:

0 commit comments

Comments
 (0)