Solved by albanD in post #2 
              
              
                Hi, 
For indexing, you don’t need lists, so you can remove the tolist(). 
The problem here is that you set multiple values at once and so there is a race condition and only one of them is set at the end. 
You should use index_put_() with accumulate=True to get what you want: 
regular_tensor.index_pu…