title: Understanding tf.scatter_nd_update: How to update column values?
body: <p>I am trying to translate a NumPy operation of sliced update into TensorFlow. i want to reproduce the following minimal example:</p>
  
  <pre><code>input = np.arange(3 * 5).reshape((3, 5))
  
  array([[ 0,  1,  2,  3,  4],
         [ 5,  6,  7,  8,  9],
         [10, 11, 12, 13, 14]])
  
  input[:, [0, 2]] = -1
  
  array([[-1,  1, -1,  3,  4],
         [-1,  6, -1,  8,  9],
         [-1, 11, -1, 13, 14]])
  </code></pre>
  
  <p>So, I want to set a constant value to all elements of certain columns in the array.</p>
  
  <p>Now, I have Tensors instead of NumPy arrays, column indices are also computed dynamically and stored in Tensors. I have found how to update all the values in given <em>rows</em> using <code>tf.scatter_nd_update</code>:</p>
  
  <pre><code>input = tf.Variable(tf.reshape(tf.range(3 * 5, dtype=tf.int32), [3, 5]))                                                                                                                                                                                          
  indices = tf.constant([[0], [2]])                                                                                                                                                                                                                                 
  updates = tf.constant([[-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1]])                                                                                                                                                                                               
  
  scatter = tf.scatter_nd_update(input, indices, updates)                                                                                                                                                                                                           
  
  with tf.Session() as sess:                                                                                                                                                                                                                                        
      sess.run(tf.global_variables_initializer())                                                                                                                                                                                                                   
      print(sess.run(scatter)) 
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[[-1 -1 -1 -1 -1]
   [ 5  6  7  8  9]
   [-1 -1 -1 -1 -1]]
  </code></pre>
  
  <p>But how can I do this for certain columns?</p>