import numpy as np from collections import Counter data = np.array([1.1,2,3,4,4,5]) Counter(data) #简单方法 sum(data==4)
原文地址:https://www.cnblogs.com/wzdLY/p/9630717.html
时间: 2024-10-15 00:44:18
import numpy as np from collections import Counter data = np.array([1.1,2,3,4,4,5]) Counter(data) #简单方法 sum(data==4)
原文地址:https://www.cnblogs.com/wzdLY/p/9630717.html