Hi,
I would like to do something like this:
a = torch.randint(0, 5, (6,))
inds = torch.randint(0, 7, (5,))
for i, ind in enumerate(inds):
    a[a==ind] = i

The for loop method is likely to be slow, is there better method to do this please ?