title: Get the number of nonzero elements in a numpy array?
body: <p>Is it possible to get the length of the nonzero elements in a numpy array without iterating over the array or masking the array.  Speed is the main goal of calculating the length.</p>
  
  <p>Essentially, something like <code>len(array).where(array != 0)</code>.</p>
  
  <p>If it changes the answer, each row will begin with zeros.  The array is filled on the diagonal with zeros.</p>