def stetson_mean(x, weight=100., alpha=2., beta=2., tol=1.e-6, nmax=20):
    mu = np.median(x)
    for i in range(nmax):
        resid = x - mu
        resid_err = np.abs(resid) * np.sqrt(weight)
        weight1 = weight / (1. + (resid_err / alpha)**beta)
        weight1 /= weight1.mean()
        diff = np.mean(x * weight1) - mu
        mu += diff
        if (np.abs(diff) < tol*np.abs(mu) or np.abs(diff) < tol):
            break

    return mu
Returns the distinguished name of the sub schema sub entry
dataset/ETHPy150Open cesium-ml/cesium/cesium/science_features/stetson.py/stetson_mean--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/python-ldap-2.3.13/Lib/ldap/ldapobject.py/SimpleLDAPObject.search_subschemasubentry_s