How to get the parietal tensor

I have a very simple question.

How can I get the parietal tensor like

236
320
30
31
[torch.cuda.LongTensor of size 4 (GPU 0)]

from

236
320
30
31
273
14
482
61
1264
453
2
[torch.cuda.LongTensor of size 11 (GPU 0)]

This should work:

a = torch.LongTensor([236,320,30,31,273,14,482,61,1264,453,2])
a[:4]