As torch.range 846 is deprecated, how do I get a 1-D tensor in [start, end] with torch.arange 846
>>> torch.arange(-1.0,1.0,5)
torch([-1.0000, -0.5000, 0.0000, -0.5000])

>>> torch.range(-1.0,1.0,5)
torch([-1.0000, -0.5000, 0.0000, -0.5000, 1.0000])

without adding step value to end parameters in torch.arange? Any elegant way?
>>> step = 0.5
>>> torch.arange(-1.0,1.0+step,5)
torch([-1.0000, -0.5000, 0.0000, -0.5000, 1.0000])