def get_weight_variance(self, *args, **kwargs):
Weight = apps.get_model('ddm_core', 'Weight')
weights = Weight.objects.filter(criterion=self, *args, **kwargs).values_list('value', flat=True)
try:
return statistics.variance(weights)
except statistics.StatisticsError:
return 0
abstract_models.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录