title: Newbie issue, no idea why my program does what it does and how to fix it
body: <p>I have been coding in python for a little more than 2 weeks as part of a university class.</p>
  
  <p>I will now attempt to describe what the program is meant to do, but it's a bit hard as my english seems inadequate.</p>
  
  <p>In my class I am to write a function that takes a numpy array. The function should compile a list of numbers that have the same whole number before the decimal, but only if there are 3 or more numbers with the same whole number.</p>
  
  <p>For example, if 1.4, 1.5 and 1.6 are in the list, all three will be compiled into the result list. If the input list were 2.3, 2.5, 3.5 then nothing will be compiled since there are no cases of the same whole number appearing three times.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>def removeIncomplete2(id):
  
      ip = id
      for N in range(np.size(ip)):
          ip[N] = np.round(ip[N]-0.5,0)
  
      x = 0
         for N in range(np.size(ip)):
  
              for n in range(np.size(ip)):
                  if ip[N]==ip[n]:
                      x = x + 1
              if x &gt; 3 and x != 0:
                  id = np.delete(id, id[N])
  
      x = 0
  
      id = id[id &gt; 0]
      return id
  </code></pre>
  
  <p>The test i put in is: </p>
  
  <pre><code>removeIncomplete2(numpy.array ([1.3, 2.2, 2.3, 4.2, 5.1, 3.2, 5.3, 3.3, 2.1, 1.1, 5.2, 3.1])
  </code></pre>
  
  <p>)</p>
  
  <p>It should return </p>
  
  <pre><code>[ 2.2 2.3 5.1 3.2 5.3 3.3 2.1 5.2 3.1]
  </code></pre>
  
  <p>but returns:</p>
  
  <pre><code>[ 1.  2.  2.  4.  5.  3.  5.  3.  2.  1.  5.  3.]
  </code></pre>
  
  <p>I am stuck, and any advice is welcome. I am new at this coding, and I have no idea why it spits out what it does, and I have no idea how to fix it.
  Any help is much welcomed!</p>