Skip to content

Commit

Permalink
Clarify wording around overrides subclasses. (#51031)
Browse files Browse the repository at this point in the history
Summary:
Fixes #47117

Pull Request resolved: #51031

Reviewed By: bdhirsh

Differential Revision: D26047498

Pulled By: albanD

fbshipit-source-id: dd0a7d9f97c0f6469b3050d2e3b4473f1bee3820
  • Loading branch information
hameerabbasi authored and facebook-github-bot committed Jan 25, 2021
1 parent a6257b2 commit f7b339d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/notes/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ of a function from ``torch.Tensor`` subclasses, they must use

Subclassing ``torch.Tensor``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
As of version 1.7.0, methods and functions applied on ``torch.Tensor`` subclasses
As of version 1.7.0, methods on ``torch.Tensor`` and functions in public
``torch.*`` namespaces applied on ``torch.Tensor`` subclasses
will return subclass instances instead of ``torch.Tensor`` instances::

>>> class SubTensor(torch.Tensor):
Expand Down

0 comments on commit f7b339d

Please sign in to comment.