📅  最后修改于: 2022-03-11 14:45:20.531000             🧑  作者: Mango
代码示例1
import numpy as np
x = np.array([0.2, 6.4, 3.0, 1.6])
bins = np.array([0.0, 1.0, 2.5, 4.0, 10.0])
out = np.digitize(x,bins=bins)