The array API specification stipulates that only the first argument in arange is positional only. The other two, end and step need to be independently usable.
>>> torch.arange(5, end=10)
tensor([5, 6, 7, 8, 9])
>>> torch.arange(5, step=2)
TypeError: arange() received an invalid combination of arguments - got (int, step=int), but expected one of:
* (Number end, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
* (Number start, Number end, Number step, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
cc @gchanan @mruberry @rgommers @pmeier @asmeurer @leofang @AnirudhDagar @asi1024 @emcastillo @kmaehashi
The array API specification stipulates that only the first argument in
arangeis positional only. The other two,endandstepneed to be independently usable.cc @gchanan @mruberry @rgommers @pmeier @asmeurer @leofang @AnirudhDagar @asi1024 @emcastillo @kmaehashi