iminuit_wrapper.py 文件源码

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

项目:kafe 作者: dsavoiu 项目源码 文件源码
def get_error_matrix(self, correlation=False):  # VIEWED TODO
        '''Retrieves the parameter error matrix from iminuit.

        correlation : boolean (optional, default ``False``)
            If ``True``, return correlation matrix, else return
            covariance matrix.

        return : `numpy.matrix`
        '''

        # get parameter covariance matrix from iminuit

        # FIX_UPSTREAM we need skip_fixed=False, but this is unsupported
        #_mat = self.__iminuit.matrix(correlation, skip_fixed=False)

        # ... so use skip_fixed=False instead and fill in the gaps
        _mat = self.__iminuit.matrix(correlation, skip_fixed=True)
        _mat = np.asmatrix(_mat)  # reshape into numpy matrix
        _mat = self._fill_in_zeroes_for_fixed(_mat)  # fill in fixed par 'gaps'

        return _mat
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号