我有以下课程
def get_percentile(obs,*args):
lstper = []
for arg in args:
lstper.append(np.percentile(obs,arg))
return lstper
get_percentile([1,2,3,4,5],25,50,75)
[2.0, 3.0, 4.0]
class Metric(object):
def __init__(self,*args):
self.max = max(args)
self.median =np.median(args)
self.min = min(args)
self.percentile = get_percentile(args)
我无法理解正确的集合self.percentile = get_percentile(args)
以获得各种百分位数