📜  区间数组中的 numpy 计数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:35.525000             🧑  作者: Mango

代码示例1
# 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()