I have tensor ts1 and ts2 , I want to update ts1 last column from value of second column of ts2 on the base of condition ts2[:,1]==ts1[:,0] , but without loop, thankyou , any help
ts3=torch.tensor([
 [ 24,  24,   8,0 ],
 [ 38 , 100 , 93,0],
 [ 65 , 91 , 73 ,0],
 [ 49 , 26 , 45 ,0],
 [ 78 , 54 , 11 ,0],
 [ 24 , 98 , 12 ,0],
 [ 27 , 55 , 50 ,0],
 [ 11 , 65 , 96 ,0],
 [ 45 , 40 , 16 ,0],
 [ 99 , 54 , 27,0 ]],dtype=torch.int32)

ts2=torch.tensor([[100,10],[26,20],[54,30]],dtype=torch.int32)

the result should be

([
 [ 24,  24,   8,0 ],
 [ 38 , 100 , 93,10],
 [ 65 , 91 , 73 ,0],
 [ 49 , 26 , 45 ,20],
 [ 78 , 54 , 11 ,30],
 [ 24 , 98 , 12 ,0],
 [ 27 , 55 , 50 ,0],
 [ 11 , 65 , 96 ,0],
 [ 45 , 40 , 16 ,0],
 [ 99 , 54 , 27,30 ]])