scipy.stats.mstats.mode

scipy.stats.mstats.mode(a, axis=0)

Returns an array of the modal (most common) value in the passed array.

If there is more than one such value, only the first is returned. The bin-count for the modal bins is also returned.

Parameters:

a : array

axis=0 : int

Returns:

(array of modal values, array of counts for each mode) :