Error with torch.scatter_

Hi,I am very new to pytorch and I am exploring the torch library.I am getting the following issue with scatter_
import torch

one_hot = torch.zeros(10,10,dtype=torch.float64)

one_hot.shape

a=torch.Tensor([3.,5.,2.,1.,4.,6.,7.,8.,9.,10.])
one_hot.scatter_(1,a.unsqueeze(1),1)
RuntimeError Traceback (most recent call last)
in ()
----> 1 one_hot.scatter_(1,a.unsqueeze(1),1)

RuntimeError: index 4656722015779028992 is out of bounds for dimension 1 with size 10

maybe it expect index as type long, so,

a = torch.tensor([3,5,2,1,4,6,7,8,9])

would work

hi, it worked replaced I guess the issue was with float dtype.