title: Why would numpy.count_nonzero(arr) not work with assigned axis value?
body: <p>I have a two dimensional array and would like to count values by row. Even though I assign an axis value, axis = 1, method still returns single integer.</p>
  
  <pre><code>x = rng.randint(10, size=(6,3))
  
  x
  Out[120]: 
  array([[3, 3, 8],
         [8, 8, 2],
         [3, 2, 0],
         [8, 8, 3],
         [8, 2, 8],
         [4, 3, 0]])
  
  np.count_nonzero(x)
  Out[121]: 16
  
  np.count_nonzero(x, axis=1)
  Out[122]: 16
  </code></pre>
  
  <p>I tried copying an example directly from the docs page and got the same results.</p>
  
  <pre><code>np.count_nonzero([[0,1,7,0,0],[3,0,0,2,19]], axis=1)
  Out[123]: 5
  </code></pre>
  
  <p>Where expected:</p>
  
  <pre><code>array([2, 3])
  </code></pre>
  
  <p>I using Python 3.6</p>
  
  <p>Any ideas what might be keeping the method from returning an array of counts from across rows?</p>