krishnab:

Or does roll() also create copies.


It does create a copy IIRC.
But if you need to add new elements at the end anyways, you will have to use something like torch.cat() that does a copy. So you can simply do something like `base = torch.cat([base[3:], new_el], dim=0) to just do a single copy.