How to handle vector like in numpy?

You can simply do:

counter = sum(>=(threshold), array)
4 Likes