title: AttributeError: 'numpy.int32' object has no attribute 'append'
body: <p>First let me show what i want to do.<br>
  I have a matrix, </p>
  
  <pre><code>x = [1, 2, 1, 2, 3, 3, 2, 3, 1, 2]
  </code></pre>
  
  <p>All i want do is to select position of repeated numbers in the array and print it in a matrix x_new where :</p>
  
  <pre><code>x_new[0]= [0,2,8] (for similar position of repeated 1's in x)  
  x_new[1]=[1,3,6,9](for similar position of repeated 2's in x)  
  x_new[2]=[4,5,7] (for similar position of repeated 3's in x)
  </code></pre>
  
  <p>Until now what i have done is :</p>
  
  <pre><code>a=[]      
  x=m[:,3]  #x=np.array([1, 2, 1, 2, 3, 3, 2, 3, 1, 2])     
  ss=set([i for i in x if sum([1 for a in x if a == i]) &gt; 1])     
  lenss=len(ss)      
  for ln in range(lenss):    
      for k in range(10):      
          if(x[k]== list(ss)[ln]):    
              print k     
          a.append(ln)    
      print 'next'    
  </code></pre>
  
  <p>But at the a.append line it's showing:</p>
  
  <p><strong>'numpy.int32' object has no attribute 'append'</strong></p>
  
  <p>Can anyone please tell me how to overcome this error? Thanks  </p>