title: Assign value to array (Python, Numpy)
body: <p>I have initialized an array in the form of </p>
  
  <pre><code>for x in range(0,21000): 
      if np.amax(probability[x]) &gt; 0.2:
          i = i+1
  </code></pre>
  
  <p><code>Label = np.zeros(shape=(i,130))</code>             </p>
  
  <p>and now with the following for cycle I would like to assign the value to each row of Label</p>
  
  <pre><code>for x in range(0,21000):
      if np.amax(probability[x]) &gt; 0.2:
          Label[i] = [feature[x],y[x],np.amax(probability)[x]]
      i = i+1
  </code></pre>
  
  <p>Where feature is an array 128*21000. 
  Unfortunately, I keep receving the following error:</p>
  
  <pre><code>Label[i] = [feature[x],y[x],np.amax(probability)[x]]
  IndexError: invalid index to scalar variable.
  </code></pre>