-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Open
Labels
module: python array apiIssues related to the Python Array APIIssues related to the Python Array APImodule: tensor creationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
The array API specification stipulates that the following should hold for the return value of torch.arange
:
The length of the output array must be
ceil((stop-start)/step)
ifstop - start
andstep
have the same sign, and length0
otherwise. We currently bail out:
>>> torch.arange(1, 0)
RuntimeError: upper bound and larger bound inconsistent with step sign
cc @gchanan @mruberry @rgommers @pmeier @asmeurer @leofang @AnirudhDagar @asi1024 @emcastillo @kmaehashi
Metadata
Metadata
Assignees
Labels
module: python array apiIssues related to the Python Array APIIssues related to the Python Array APImodule: tensor creationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module