How to get the distribution name from a spicy.stats. frozen distribution?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 20:04:09

The Frozen Distribution rv_frozen Class

The frozen distribution, or rv_frozen class creates an instance of the distribution during initialization and this is stored in the self.dist attribute. To access attributes of the original distribution, use rv.dist.{attribute}.

import scipy.stats as stats

# Get the name of the distribution
print 'gamma :', stats.norm.name

# Create frozen distribution
rv = stats.norm()

# Get the name of the frozen distribution
print 'rv    :', rv.dist.name

gamma : norm
rv    : norm
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!