eelbrain.Var.count

Var.count()

Count the number of occurrence of each value

Notes

Counting starts with zero (see examples). This is to facilitate integration with indexing.

Examples

>>> v = Var([1, 2, 3, 1, 1, 1, 3])
>>> v.count()
Var([0, 0, 0, 1, 2, 3, 1])