(self)
return result - 3
Return the sample excess kurtosis which
        .. math::
            g = \frac{m_4}{m_2^2} - 3

        If bias is False, the calculations are corrected for statistical bias.
Return the sample excess kurtosis which
        .. math::
            g = \frac{m_4}{m_2^2} - 3
Return the sample excess kurtosis which .. math :: g = \ frac { m_4 } { m_2^2 } - 3
def kurtosis(self):
        """
        Return the sample excess kurtosis which
        .. math::
            g = \frac{m_4}{m_2^2} - 3

        If bias is False, the calculations are corrected for statistical bias.
        """
        m2 = self.variance
        m4 = self.moment_4
        n = self.count
        zero = (m2 == 0)
        np.seterr(divide='ignore', invalid='ignore')
        result = np.where(zero, 0, m4 / m2 ** 2.0)
        if not self.bias:
            can_correct = (n > 3) & (m2 > 0)
            if can_correct.any():
                m2 = np.extract(can_correct, m2)
                m4 = np.extract(can_correct, m4)
                nval = 1.0 / (n - 2) / (n - 3) * ((n ** 2 - 1.0) * m4 / m2 ** 2.0 - 3 * (n - 1) ** 2.0)
                np.place(result, can_correct, nval + 3.0)
        return result - 3
def kurtosis ( self ) : m2 = self . variance m4 = self . moment_4 n = self . count zero = ( m2 == 0 ) np . seterr ( divide = 'ignore' , invalid = 'ignore' ) result = np . where ( zero , 0 , m4 / m2 ** 2.0 ) if not self . bias : can_correct = ( n > 3 ) & ( m2 > 0 ) if can_correct . any ( ) : m2 = np . extract ( can_correct , m2 ) m4 = np . extract ( can_correct , m4 ) nval = 1.0 / ( n - 2 ) / ( n - 3 ) * ( ( n ** 2 - 1.0 ) * m4 / m2 ** 2.0 - 3 * ( n - 1 ) ** 2.0 ) np . place ( result , can_correct , nval + 3.0 ) return result - 3