8000 Fix the basic description of torch.min(), torch.max(), torch.all(), t… · pytorch/pytorch@7cb5c75 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7cb5c75

Browse files
ILCSFNOpytorchmergebot
authored andcommitted
Fix the basic description of torch.min(), torch.max(), torch.all(), torch.any() (#152658)
Fixes #152176 Pull Request resolved: #152658 Approved by: https://github.com/malfet
1 parent 5683965 commit 7cb5c75

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

torch/_torch_docs.py

Lines changed: 21 additions & 3 deletions
6491
Original file line numberDiff line numberDiff line change
@@ -792,14 +792,20 @@ def merge_dicts(*dicts):
792792
add_docstr(
793793
torch.all,
794794
r"""
795-
all(input: Tensor) -> Tensor
795+
all(input: Tensor, *, out=None) -> Tensor
796796
797797
Tests if all elements in :attr:`input` evaluate to `True`.
798798
799799
.. note:: This function matches the behaviour of NumPy in returning
800800
output of dtype `bool` for all supported dtypes except `uint8`.
801801
For `uint8` the dtype of output is `uint8` itself.
802802
803+
Args:
804+
{input}
805+
806+
Keyword args:
807+
{out}
808+
803809
Example::
804810
805811
>>> a = torch.rand(1, 2).bool()
@@ -855,6 +861,12 @@ def merge_dicts(*dicts):
855861
output of dtype `bool` for all supported dtypes except `uint8`.
856862
For `uint8` the dtype of output is `uint8` itself.
857863
864+
Args:
865+
{input}
866+
867+
Keyword args:
868+
{out}
869+
858870
Example::
859871
860872
>>> a = torch.rand(1, 2).bool()
@@ -6488,13 +6500,16 @@ def merge_dicts(*dicts):
64886500
add_docstr(
64896501
torch.max,
64906502
r"""
-
max(input) -> Tensor
6503+
max(input, *, out=None) -> Tensor
64926504
64936505
Returns the maximum value of all elements in the ``input`` tensor.
64946506
64956507
Args:
64966508
{input}
64976509
6510+
Keyword args:
6511+
{out}
6512+
64986513
Example::
64996514
65006515
>>> a = torch.randn(1, 3)
@@ -7103,13 +7118,16 @@ def merge_dicts(*dicts):
71037118
add_docstr(
71047119
torch.min,
71057120
r"""
7106-
min(input) -> Tensor
7121+
min(input, *, out=None) -> Tensor
71077122
71087123
Returns the minimum value of all elements in the :attr:`input` tensor.
71097124
71107125
Args:
71117126
{input}
71127127
7128+
Keyword args:
7129+
{out}
7130+
71137131
Example::
71147132
71157133
>>> a = torch.randn(1, 3)

0 commit comments

Comments
 (0)
0