title: Count occurrences of unique arrays in array
body: <p>I have a numpy array of various one hot encoded numpy arrays, eg;</p>
  
  <pre><code>x = np.array([[1, 0, 0], [0, 0, 1], [1, 0, 0]])
  </code></pre>
  
  <p>I would like to count the occurances of each unique one hot vector,</p>
  
  <pre><code>{[1, 0, 0]: 2, [0, 0, 1]: 1}
  </code></pre>