I was looking at torch.split() and apparently it splits a tensor into chunks along a given dimension, so if I do
a = torch.tensor([1,2])
torch.split(a, 2, 1)
it gives me an error that says IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1).
How can dimension be negative? I thought dimension here means 2-> 0 dimension, [1,2] -> 1 dimension, how ever many  how ever many dimensions there are. What is this -1 dimension doing here and how does that make sense in the example of torch.split()?