title: Can NumPy take care that an array is (nonstrictly) increasing along one axis?
body: <p>Is there a function in numpy to guarantee or rather fix an array such that it is (nonstrictly) increasing along one particular axis?
  For example, I have the following 2D array:</p>
  
  <pre><code>X = array([[1, 2, 1, 4, 5],
             [0, 3, 1, 5, 4]])
  </code></pre>
  
  <p>the output of <code>np.foobar(X)</code> should return</p>
  
  <pre><code>array([[1, 2, 2, 4, 5],
         [0, 3, 3, 5, 5]])
  </code></pre>
  
  <p>Does <code>foobar</code> exist or do I need to do that manually by using something like <code>np.diff</code> and some smart indexing?</p>