n class="p">[:,</span> <span class="p">:,</span> <span class="n">perm</span><span class="p">]</span> <span class="o">=</span> <span class="n">pair_counts_permuted</span>

    <span class="n">pair_counts_permuted_means</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">mean</span><span class="p">(</span><span class="n">pair_counts_null</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">2</span><span class="p">)</spa