title: Assign the new value to a tensor at specific indices
body: <p>This is a simple example. </p>
  
  <p>Assume that I have an input tensor M. Now I have a tensor of indices of M with size 2 x 3 such as <code>[[0, 1], [2,2], [0,1]]</code> and a new array of values which is corresponding with the index tensor is <code>[1, 2, 3]</code>. I want to assign these values to the input M satisfying that the value is assigned to the element of M at index <code>[0,1]</code> will be the min value (1 in this example).</p>
  
  <p>It means <code>M[0,1] = 1</code> and <code>M[2,2] = 2</code>.</p>
  
  <p>Can I do that by using some available functions in Pytorch without a loop?</p>