Add doc for missing functions for torch.special module (#155074)

Fixes #132178

Added all the missing functions that had a docstring but were not present in the documentation

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155074
Approved by: https://github.com/albanD
This commit is contained in:
Qasim Khan
2025-06-09 22:28:26 +00:00
committed by PyTorch MergeBot
parent bdbf2792a8
commit 82e6475d92
2 changed files with 20 additions and 2 deletions

View File

@ -15,6 +15,12 @@ Functions
.. autofunction:: airy_ai
.. autofunction:: bessel_j0
.. autofunction:: bessel_j1
.. autofunction:: bessel_y0
.. autofunction:: bessel_y1
.. autofunction:: chebyshev_polynomial_t
.. autofunction:: chebyshev_polynomial_u
.. autofunction:: chebyshev_polynomial_v
.. autofunction:: chebyshev_polynomial_w
.. autofunction:: digamma
.. autofunction:: entr
.. autofunction:: erf
@ -27,15 +33,23 @@ Functions
.. autofunction:: gammainc
.. autofunction:: gammaincc
.. autofunction:: gammaln
.. autofunction:: hermite_polynomial_h
.. autofunction:: hermite_polynomial_he
.. autofunction:: i0
.. autofunction:: i0e
.. autofunction:: i1
.. autofunction:: i1e
.. autofunction:: laguerre_polynomial_l
.. autofunction:: legendre_polynomial_p
.. autofunction:: log1p
.. autofunction:: log_ndtr
.. autofunction:: log_softmax
.. autofunction:: logit
.. autofunction:: logsumexp
.. autofunction:: modified_bessel_i0
.. autofunction:: modified_bessel_i1
.. autofunction:: modified_bessel_k0
.. autofunction:: modified_bessel_k1
.. autofunction:: multigammaln
.. autofunction:: ndtr
.. autofunction:: ndtri
@ -44,6 +58,10 @@ Functions
.. autofunction:: round
.. autofunction:: scaled_modified_bessel_k0
.. autofunction:: scaled_modified_bessel_k1
.. autofunction:: shifted_chebyshev_polynomial_t
.. autofunction:: shifted_chebyshev_polynomial_u
.. autofunction:: shifted_chebyshev_polynomial_v
.. autofunction:: shifted_chebyshev_polynomial_w
.. autofunction:: sinc
.. autofunction:: softmax
.. autofunction:: spherical_bessel_j0

View File

@ -1162,7 +1162,7 @@ Keyword args:
chebyshev_polynomial_u = _add_docstr(
_special.special_chebyshev_polynomial_u,
r"""
chebyshev_polynomial_t(input, n, *, out=None) -> Tensor
chebyshev_polynomial_u(input, n, *, out=None) -> Tensor
Chebyshev polynomial of the second kind :math:`U_{n}(\text{input})`.
@ -1171,7 +1171,7 @@ If :math:`n = 0`, :math:`1` is returned. If :math:`n = 1`,
:math:`|\text{input}| > 1`, the recursion:
.. math::
T_{n + 1}(\text{input}) = 2 \times \text{input} \times T_{n}(\text{input}) - T_{n - 1}(\text{input})
U_{n + 1}(\text{input}) = 2 \times \text{input} \times U_{n}(\text{input}) - U_{n - 1}(\text{input})
is evaluated. Otherwise, the explicit trigonometric formula: