def sem(a, axis=0, ddof=1, 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.sem(a, axis, ddof)
 n = a.shape[axis]
 s = (np.std(a, axis=axis, ddof=ddof) / np.sqrt(n))
 return s

def sem ( a , axis = 0 , ddof = 1 , 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 . sem ( a , axis , ddof ) n = a . shape [ axis ] s = ( np . std ( a , axis = axis , ddof = ddof ) / np . sqrt ( n ) ) return s
calculates the standard error of the mean of the values in the input array .