What does the scatter_ function do in layman terms?

In case anyone is looking at this after the documentation, here is an explanation for how they arrived at the first result: >>> x = torch.rand(2, 5) >>> x tensor([[ 0.3992, 0.2908, 0.9044, 0.4850, 0.6004], [ 0.5735, 0.9006, 0.6797, 0.4152, 0.1732]]) >>> torch.zeros(3, 5).scatter_(0…