DPlanner.py 文件源码

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

项目:bnpy 作者: bnpy 项目源码 文件源码
def makePlanForEmptyComps(curSS, dtargetMinCount=0.01, **kwargs):
    """ Create a Plan dict for any empty states.

        Returns
        -------
        Plan : dict with either no fields, or two fields named
               * candidateIDs
               * candidateUIDs

        Any "empty" Plan dict indicates that no empty comps exist.
    """
    Nvec = curSS.getCountVec()
    emptyIDs = np.flatnonzero(Nvec < dtargetMinCount)
    if len(emptyIDs) == 0:
        return dict()
    Plan = dict(candidateIDs=emptyIDs.tolist(),
                candidateUIDs=curSS.uIDs[emptyIDs].tolist(),
                )
    return Plan
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号