我有一个数字阵列,例如,
a = np.array([1, 3, 5, 6, 9, 10, 14, 15, 56])
我想找到特定范围内的所有元素.例如,如果范围是(6,10),答案应该是(3,4,5).是否有内置函数来执行此操作?
python numpy
numpy ×1
python ×1