title: Python: Removing OUT-OF-ORDER numbers from the list
body: <p>I'm learning python right now, but I can't seem to work out how to remove elements from a array, that is not in order.</p>
  
  <p>Say, I have </p>
  
  <pre><code>np.array([1.3,2.2,2.3,4.2,5.1,3.2,5.3,2.1,1.1,5.2,3.1])
  </code></pre>
  
  <p>I need to remove 1.3 and 1.1, because 1.2 is missing. Also 4.2 needs to be removed, because I don't have 4.1 and 4.3. In short I want to remove <strong><code>OUT-OF-ORDER</code></strong> numbers from the list.</p>
  
  <p>How do I do that?</p>
  
  <p>These three are correct: 5.1, 5.2 and 5.3</p>
  
  <p>it is for this assignment:</p>
  
  <blockquote>
    <p>You are working on a data set from a series of experiments, each of
    which consists of three parts. The experiments have been performed in
    a randomized order. Each experiment has been assigned an
    experiment-number and a part-number, which are joined into one decimal
    number called an id-number. The id-number is formed by separating the
    experiment-number and part-number by a decimal point. For example, the
    experiment number 17 part 3 has been assigned the id-number 17.3.
    Note, that you can compute the experiment-number from the id-number by
    rounding down to the nearest integer. 
    You notice that due to errors,
    for some of the experiments all three parts have not been completed.
    For further analysis, you need to exclude all experiments where one or
    more parts are not available. You can safely assume that if there are
    3 id-numbers with the same experiment-number, the experiment is
    complete. </p>
    
    <p>** Problem definition **
    Create a function that takes as an input
    a vector of id-numbers and returns a vector of id-numbers where all
    incomplete experiments have been removed. The id-numbers that are not
    removed must remain in the same order as in the original vector.</p>
  </blockquote>
  
  <p><em>Solution Template</em></p>
  
  <pre><code>def removeincomplete(id):
  #your code here
   return completeid
  </code></pre>