cf.AncillaryVariables.count

AncillaryVariables.count(value)[source]

Return the number of occurrences of a given value.

Uses numerically tolerant equality where appropriate.

Parameters :
value :

The value to count.

Returns :
out : int

The number of occurrences of value.

Examples

>>> s
[1, 2, 3, 2, 4, 2]
>>> s.count(1)
1
>>> s.count(2)
3

Previous topic

cf.AncillaryVariables.copy

Next topic

cf.AncillaryVariables.delprop

This Page