title: How to test if all rows are equal in a numpy
body: <p>In numpy, is there a nice idiomatic way of testing if all rows are equal in a 2d array?</p>
  
  <p>I can do something like</p>
  
  <pre><code>np.all([np.array_equal(M[0], M[i]) for i in xrange(1,len(M))])
  </code></pre>
  
  <p>This seems to mix python lists with numpy arrays which is ugly and presumably also slow. </p>
  
  <p>Is there a nicer/neater way?</p>