Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy count occurrences in interval array

# credit to Stack Overflow user in source link
# a is a numpy array
# Note: the following syntax allows you to count the number of elements x
# of the array such that 25 < x < 100 
((a > 25) & (a < 100)).sum()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #count #occurrences #interval #array
ADD COMMENT
Topic
Name
5+6 =