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
评论列表
文章目录