Skip to content

Wrong output of "narrow" operation on the documentation. #291

@rooa

Description

@rooa

One minor typo. An example code in Efficient Memory Management section on the latest documentation has a typo. After narrow operation, the output should be as follows according to the source.

>>> x.narrow(0, 1, 2).fill_(1)
>>> # narrow() returns a Tensor referencing the same Storage as x
>>> print(x)
 0
 1
 1
 0
 0

Metadata

Metadata

Assignees

Labels

todoNot as important as medium or high priority tasks, but we will work on these.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions