Here is an array in python:
T = np.array([[1,1,2],[2,1,1],[3,3,3]])
print np.where(T==1)
I want to find the number of appearance of each element. I tried to use np.where and then len(np.where). However the output of np.where doesn't allow to use the len() function.