title: Numpy find agreement between columns in array
body: <p>I have labels from 'n' different people who rated 'm' items (either 0 or 1), so an m x n array. For example, 3 people rating 4 items:</p>
  
  <pre><code>arr = np.asarray([[1,1,1], [1,1,0], [0,0,0], [0, 1, 0]])
  print(arr)
  &gt;&gt;&gt;
  [[1 1 1]
   [1 1 0]
   [0 0 0]
   [0 1 0]]
  </code></pre>
  
  <p>I want to see on which items everyone "agreed", i.e. all values in the row are the same. In this example the answer is [True, False, True, False]. I got it working using this:</p>
  
  <pre><code>np.logical_or(arr.sum(axis=1) == n, arr.sum(axis=1) == 0)
  </code></pre>
  
  <p>Kind of hacky. What's a better way of doing this?</p>