mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Add missing docstring for sym_ite
(#154201)
`sym_ite` is listed in [the reference page](https://docs.pytorch.org/docs/stable/torch.html) and has no document. Pull Request resolved: https://github.com/pytorch/pytorch/pull/154201 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
02445ec8f0
commit
f55f2f42a7
@ -978,6 +978,7 @@ __all__.append("sym_sqrt")
|
||||
|
||||
|
||||
def sym_ite(b, t, f):
|
||||
"""SymInt-aware utility for ternary operator (``t if b else f``.)"""
|
||||
if overrides.has_torch_function((b, t, f)):
|
||||
return overrides.handle_torch_function(sym_ite, (b, t, f), b, t, f)
|
||||
assert isinstance(b, (SymBool, builtins.bool)) and type(t) == type(f)
|
||||
|
Reference in New Issue
Block a user