(cnts)
return freqs
Return word --> # of docs it appears in.
Return word --> # of docs it appears in.
Return word -- > # of docs it appears in .
def get_doc_freqs(cnts):
    """Return word --> # of docs it appears in."""
    binary = (cnts > 0).astype(int)
    freqs = np.array(binary.sum(1)).squeeze()
    return freqs
def get_doc_freqs ( cnts ) : binary = ( cnts > 0 ) . astype ( int ) freqs = np . array ( binary . sum ( 1 ) ) . squeeze ( ) return freqs