title: how to generate array tensor in tensorflow
body: <p>I generated input tensor A tensor using the following codes in tensorflow; </p>
  
  <pre><code>import tensorflow as tf
  
  A = tf.constant(1.0, shape = [10, 10])
  with tf.Session() as sess:
     print(sess.run(A))
  output = [[ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
   [ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]]
  </code></pre>
  
  <p>I want to set parts of the entries to zero, say half or quarter along either the column or raw and I did the following; </p>
  
  <pre><code>import numpy as np
  output = np.array(A)
  A1 = output[:, output.shape[1]//2:] = 0
  print(A1)
  </code></pre>
  
  <p>But I was getting error 'tuple index out of range' Please help
  <code>print(sess.run(A1))</code></p>