This question refers to latest version in master branch.
When we define a Tensor object, what is the best way to retrieve one of element as scalar value ?
x = torch.Tensor([2, 3])



x.data[0] still returns Tensor type


x.numpy()[0] gives scalar value, but with type numpy.int64 which sometimes leads to problems


x.tolist()[0] returns int type.


Seems for now tolist() works well. The question is, why x.data does not return int type ?