>>> my_list = [3,2,56,4,32,4,7,88,4,3,4]
>>> bins = [0,20,40,60,80,100]
>>> np.digitize(my_list,bins)
array([1, 1, 3, 1, 2, 1, 1, 5, 1, 1, 1])
which bins one value should belong to?
猜你喜欢
转载自blog.csdn.net/chenxin0215/article/details/83024679
今日推荐
周排行