array + python range torch.arange — PyTorch 2.2 documentationReturns a 1-D tensor of size ⌈end−startstep⌉\left\lceil \frac{\text{end} - \text{start}}{\text{step}} \right\rceil⌈stepend−start⌉ with values from the interval [start, end) taken with common difference step beginning from start.https://pytorch.org/docs/stable/generated/torch.arange.html