but why would you not directly specify 2.4 to add, instead of 0.4, and then 2, that is accumulate the same coordinates values in the values tensor itself
another way to do this is through,
values = torch.tensor([
    [0.4],    # at coordinates (0, 1)
    [-1.4],   # at coordinates (0, 2)
    [-1.13],  # at coordinates (0, 3)
    [-1],     # at coordinates (0, 6)
    [3],      # at coordinates (1, 2)
    [2]       # at coordinates (0, 1)
])
to_be_filled[index.split(1, 1)] += values

but it would also consider the last addition for each index, and give 2, not 2.4