if k is not None:
        _log.debug("truncating to k for recall")
        tcounts = np.minimum(tcounts, k)
        recs = recs[recs["rank"] <= k]