i have created a atrix of random integers which is for instance having multiple numbers having maximum frequency count. SO I want to know the numbers.
I have tried using the np.unique() code and consequently instead of getting an array or tuple i am getting only one number
You can try the following, it will return all maximum count values -
u, c = np.unique(x, return_counts = True)
y = u[c == c.max()]
1 Like