discrete.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:vampyre 作者: GAMPTeam 项目源码 文件源码
def __init__(self, zval, pz, shape, var_axes=(0,),\
                 is_complex=False):
        Estim.__init__(self)

        # Convert scalars to arrays
        if np.isscalar(zval):
            zval = np.array([zval])
        if np.isscalar(pz):
            pz = np.array([pz])

        # Set parameters
        self.zval = zval
        self.pz = pz
        self.shape = shape
        self.is_complex = is_complex
        self.fz = -np.log(pz)

        # Set the variance axes
        if var_axes == 'all':
            ndim = len(shape)
            var_axes = tuple(range(ndim))
        self.var_axes = var_axes        
        self.cost_avail = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号