Method: Array#value_counts
- Defined in:
- ext/enumerable/statistics/extension/statistics.c
#value_counts(normalize: false, sort: true, ascending: false, dropna: true) ⇒ Hash
Returns a hash that contains the counts of values in ary.
This method treats nil and NaN, the objects who respond true to nan?,
as the same thing, and stores the count of them as the value for nil.
2130 2131 2132 2133 2134 |
# File 'ext/enumerable/statistics/extension/statistics.c', line 2130
static VALUE
ary_value_counts(int argc, VALUE* argv, VALUE ary)
{
return any_value_counts(argc, argv, ary, ary_value_counts_without_sort);
}
|