def stetson_j(x, y=[], dx=0.1, dy=0.1):
    n = len(x)
    x0 = stetson_mean(x, 1./dx**2)
    delta_x = np.sqrt(n / (n - 1.)) * (x - x0) / dx

    if (len(y) > 0): 
        y0 = stetson_mean(y, 1./dy**2)
        delta_y = np.sqrt(n / (n - 1.)) * (y - y0) / dy
        p_k = delta_x * delta_y
    else:
        p_k = delta_x**2 - 1.

    return np.mean(np.sign(p_k) * np.sqrt(np.abs(p_k)))
Gets a champion by name
dataset/ETHPy150Open cesium-ml/cesium/cesium/science_features/stetson.py/stetson_j--crossover with--dataset/ETHPy150Open meraki-analytics/cassiopeia/cassiopeia/core/staticdataapi.py/get_champion_by_name