numpy count occurrences in interval array

Solutions on MaxInterview for numpy count occurrences in interval array by the best coders in the world

showing results for - "numpy count occurrences in interval array"
Mohammed
14 Jul 2016
1# credit to Stack Overflow user in source link
2# a is a numpy array
3# Note: the following syntax allows you to count the number of elements x
4# of the array such that 25 < x < 100 
5((a > 25) & (a < 100)).sum()
similar questions
queries leading to this page
numpy count occurrences in interval array