eelbrain.Factor.count
- Factor.count(value=None, start=-1)[source]
Cumulative count of the occurrences of
value- Parameters:
- Returns:
count – Cumulative count of value in self.
- Return type:
Examples
>>> a = Factor('abcabcabccc') >>> a Factor(['a', 'b', 'c', 'a', 'b', 'c', 'a', 'b', 'c', 'c', 'c']) >>> a.count() array([0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4]) >>> a.count('a') array([0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2])