Why does the torch.utils.data.WeightedRandomSampler sample theses values only approximately equal with equal weights?
list(WeightedRandomSampler([0.3, 0.3, 0.3], 1000, replacement=True)).count(2)
Out[15]: 346
list(WeightedRandomSampler([0.3, 0.3, 0.3], 1000, replacement=True)).count(1)
Out[16]: 339
list(WeightedRandomSampler([0.3, 0.3, 0.3], 1000, replacement=True)).count(0)
Out[17]: 319

Shouldn’t this yield 333, 333, 333 ?