def kurtosis(a, axis=0, fisher=True, bias=True, nan_policy='propagate'):
 (a, axis) = _chk_asarray(a, axis)
 (contains_nan, nan_policy) = _contains_nan(a, nan_policy)
 if (contains_nan and (nan_policy == 'omit')):
  a = ma.masked_invalid(a)
  return mstats_basic.kurtosis(a, axis, fisher, bias)
 n = a.shape[axis]
 m2 = moment(a, 2, axis)
 m4 = moment(a, 4, axis)
 zero = (m2 == 0)
 olderr = np.seterr(all='ignore')
 try:
  vals = np.where(zero, 0, (m4 / (m2 ** 2.0)))
 finally:
  np.seterr(**olderr)
 if (not 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(vals, can_correct, (nval + 3.0))
 if (vals.ndim == 0):
  vals = vals.item()
 if fisher:
  return (vals - 3)
 else:
  return vals

def kurtosis ( a , axis = 0 , fisher = True , bias = True , nan_policy = 'propagate' ) : ( a , axis ) = _chk_asarray ( a , axis ) ( contains_nan , nan_policy ) = _contains_nan ( a , nan_policy ) if ( contains_nan and ( nan_policy == 'omit' ) ) : a = ma . masked_invalid ( a ) return mstats_basic . kurtosis ( a , axis , fisher , bias ) n = a . shape [ axis ] m2 = moment ( a , 2 , axis ) m4 = moment ( a , 4 , axis ) zero = ( m2 == 0 ) olderr = np . seterr ( all = 'ignore' ) try : vals = np . where ( zero , 0 , ( m4 / ( m2 ** 2.0 ) ) ) finally : np . seterr ( ** olderr ) if ( not 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 ( vals , can_correct , ( nval + 3.0 ) ) if ( vals . ndim == 0 ) : vals = vals . item ( ) if fisher : return ( vals - 3 ) else : return vals
returns the degree of peakedness of the given list of values: > 0 .