In pytorch, if both tensors are long, an integer division will be performed :
tensor([242240, 226320, 186240, 171840, 165680]) / torch.tensor(694)
Out : tensor([349, 326, 268, 247, 238])

I need a regular division so I tried to convert my second tensor to float, it yields the same result :
tensor([242240, 226320, 186240, 171840, 165680]) / torch.tensor(694).float()
Out : tensor([349, 326, 268, 247, 238])

However, if the first tensor is of size 1, this works :
torch.tensor(10) / torch.tensor(10).float()
Out : tensor(1.0)

This seems really weird. Any thoughts?