def skew(a, axis=0, bias=True, nan_policy='propagate'):
 (a, axis) = _chk_asarray(a, axis)
 n = a.shape[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.skew(a, axis, bias)
 m2 = moment(a, 2, axis)
 m3 = moment(a, 3, axis)
 zero = (m2 == 0)
 vals = _lazywhere((~ zero), (m2, m3), (lambda m2, m3: (m3 / (m2 ** 1.5))), 0.0)
 if (not bias):
  can_correct = ((n > 2) & (m2 > 0))
  if can_correct.any():
   m2 = np.extract(can_correct, m2)
   m3 = np.extract(can_correct, m3)
   nval = (((np.sqrt(((n - 1.0) * n)) / (n - 2.0)) * m3) / (m2 ** 1.5))
   np.place(vals, can_correct, nval)
 if (vals.ndim == 0):
  return vals.item()
 return vals

def skew ( a , axis = 0 , bias = True , nan_policy = 'propagate' ) : ( a , axis ) = _chk_asarray ( a , axis ) n = a . shape [ 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 . skew ( a , axis , bias ) m2 = moment ( a , 2 , axis ) m3 = moment ( a , 3 , axis ) zero = ( m2 == 0 ) vals = _lazywhere ( ( ~ zero ) , ( m2 , m3 ) , ( lambda m2 , m3 : ( m3 / ( m2 ** 1.5 ) ) ) , 0.0 ) if ( not bias ) : can_correct = ( ( n > 2 ) & ( m2 > 0 ) ) if can_correct . any ( ) : m2 = np . extract ( can_correct , m2 ) m3 = np . extract ( can_correct , m3 ) nval = ( ( ( np . sqrt ( ( ( n - 1.0 ) * n ) ) / ( n - 2.0 ) ) * m3 ) / ( m2 ** 1.5 ) ) np . place ( vals , can_correct , nval ) if ( vals . ndim == 0 ) : return vals . item ( ) return vals
skew matrix a such that a x v = av for any v .