How to get count of all element in numpy?
<p>suppose I have an array in numpy</p>

<pre><code>array([1,1,2,3,4,5,5,5,6,7,7,7,7])
</code></pre>

<p>What I want is to get two arrays to give count of each element:</p>

<pre><code>array([1,2,3,4,5,6,7])
array([1,1,1,1,3,1,4])
</code></pre>

<p>How can I do this without any for loops?</p>