def _countmatrix(lxs):
<EOL>share = np.zeros((lxs.shape[<NUM_LIT:0>], lxs.shape[<NUM_LIT:0>]), dtype=np.uint64)<EOL>names = range(lxs.shape[<NUM_LIT:0>])<EOL>for row in lxs:<EOL><INDENT>for samp1, samp2 in itertools.combinations(names, <NUM_LIT:2>):<EOL><INDENT>shared = lxs[samp1, lxs[samp2] > <NUM_LIT:0>].sum()<EOL>share[samp1, samp2] = shared<EOL><DEDENT><DEDENT>share += share.T<EOL>for row in xrange(len(names)):<EOL><INDENT>share[row, row] = lxs[row].sum()<EOL><DEDENT>return share<EOL>
fill a matrix with pairwise data sharing