Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting issues in torch.tensor_split documentation #46328

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions torch/_torch_docs.py
Expand Up @@ -1223,7 +1223,7 @@ def merge_dicts(*dicts):

Splits a tensor into multiple sub-tensors, all of which are views of :attr:`input`,
along dimension :attr:`dim` according to the indices or number of sections specified
by :attr:`indices_or_sections. This function is based on NumPy's
by :attr:`indices_or_sections`. This function is based on NumPy's
:func:`numpy.array_split`.

Args:
Expand All @@ -1239,11 +1239,8 @@ def merge_dicts(*dicts):

If :attr:`indices_or_sections` is a list of ints, :attr:`input` is split along
dimension :attr:`dim` at each of the indices in the list. For instance,
:code:`[2, 3]` and :code:`dim=0` would result in the following tensors:

- :code:`input[:2]`
- :code:`input[2:3]`
- :code:`input[3:]`
:code:`indices_or_sections=[2, 3]` and :code:`dim=0` would result in the tensors
:code:`input[:2]`, :code:`input[2:3]`, and :code:`input[3:]`.

dim (int, optional): dimension along which to split the tensor. Default: ``0``

Expand Down