"p">]</span>
            <span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">vectorize</span><span class="p">(</span><span class="n">plogp_func</span><span class="p">)</span>

        <span class="c1"># Dimensions are hist are (X, Y, Z^1, .... Z^dz)</span>
        <span class="c1"># plogp = _plogp_vector(T)</span>
        <span class="c1"># hxyz = (-(plogp(hist)).sum() + plogp(T)) / float(T)</span>
        <span class="c1"># hxz = (-(plogp(hist.sum(axis=1))).sum() 