title: How can i remove the first n columns/lines with 0 values in a 2D matrix?
body: <p>Referring to this previous question:</p>
  
  <p><a href="https://stackoverflow.com/questions/25333988/remove-all-zero-rows-in-a-2d-matrix">Remove all-zero rows in a 2D matrix</a></p>
  
  <pre><code>import numpy as np
  
  data = np.array([[4, 1, 1, 2, 0, 4],
                   [3, 4, 3, 1, 4, 4],
                   [1, 4, 3, 1, 0, 0],
                   [0, 4, 4, 0, 4, 3],
                   [0, 0, 0, 0, 0, 0]])
  
  data = data[~(data==0).all(1)]
  print(data)
  </code></pre>
  
  <p>Output :</p>
  
  <pre><code>    [[4 1 1 2 0 4]
       [3 4 3 1 4 4]
       [1 4 3 1 0 0]
       [0 4 4 0 4 3]]
  </code></pre>
  
  <p>ok so far so good but what if i add null column?</p>
  
  <pre><code> data = np.array([[0, 4, 1, 1, 2, 0, 4],
                    [0, 3, 4, 3, 1, 4, 4],
                    [0, 0, 1, 4, 3, 1, 0],
                    [0, 0, 4, 4, 0, 4, 3],
                    [0, 0, 0, 0, 0, 0, 0]])
  </code></pre>
  
  <p>Output is </p>
  
  <pre><code>          [[0 4 1 1 2 0 4]
             [0 3 4 3 1 4 4]
             [0 1 4 3 1 0 0]
             [0 0 4 4 0 4 3]]
  </code></pre>
  
  <p>which is not what i want.</p>
  
  <p>Basically if my matrix is :</p>
  
  <pre><code>            [[0, 0, 0, 0, 0, 0, 0, 0, 0],
               [0, 0, 4, 1, 1, 2, 0, 4, 0],
               [0, 0, 3, 4, 3, 1, 4, 4, 0],
               [0, 0, 1, 4, 3, 1, 0, 0, 0],
               [0, 0, 0, 4, 4, 0, 4, 3, 0],
               [0, 0, 0, 0, 0, 0, 0, 0, 0]]
  </code></pre>
  
  <p>The output i'll be expecting is </p>
  
  <pre><code>        [[4 1 1 2 0 4]
           [3 4 3 1 4 4]
           [1 4 3 1 0 0]
           [0 4 4 0 4 3]]
  </code></pre>