title: How to reduce to an array without any pairs of elements close by a distant, while knowing the indices
body: <p>for example I have:</p>
  
  <pre><code>x = array([[0.       , 0.94],
             [0.9486833, 0.94],
             [1.8973666, 0.94],
             [2.8460498, 0.94],
             [0.9486833, 0.94]], dtype=float32)
  
  y = array([   [1],
                [2],
                [3],
                [4],
                [5]], dtype=float32)
  </code></pre>
  
  <p>and since in x there are two elements that are close to each other by a distant, I only want to keep one so based on the elements in x that are close to each other by a threshold and I remove one, my result is:</p>
  
  <pre><code>x = array([[0.       , 0.94],
  
             [1.8973666, 0.94],
             [2.8460498, 0.94],
             [0.9486833, 0.94]], dtype=float32)
  
  y = array([   [1],
  
                [3],
                [4],
                [5] ], dtype=float32)
  </code></pre>
  
  <p>So if I know which indices from x, I have kept or removed then I can also construct y that correctly correspond to the remaining elements of x.</p>
  
  <p>In addition I have made the conversion from tensorflow to numpy array, if there was a suggestion within tensorflow, I would accept it.</p>