count values array python code example
Example 1: python how to count items in array
myArray = [1, 2, 3]
len(myArray)
#output
3
Example 2: count values python
from collections import Counter
values=np.ones(10)
Counter(values)
myArray = [1, 2, 3]
len(myArray)
#output
3
from collections import Counter
values=np.ones(10)
Counter(values)