Skip to content

Finish deprecating torch.range #55964

@mruberry

Description

@mruberry

torch.range() is deprecated; its documentation has a deprecation warning and attempting to use it throws a warning:

torch.range(1, 10)
: UserWarning: torch.range is deprecated and will be removed in a future release because its behavior is inconsistent with Python's range builtin. Instead, use torch.arange, which produces values in [start, end).
tensor([ 1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10.])

It's time to remove it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: deprecationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions