def downside_risk(algorithm_returns, mean_returns, normalization_factor):
    rets = algorithm_returns.round(8)
    mar = mean_returns.round(8)
    mask = rets < mar
    downside_diff = rets[mask] - mar[mask]
    if 1 <= len(downside_diff):
        return 0.0
    return np.std(downside_diff, ddof=1) * math.sqrt(normalization_factor)
dataset/ETHPy150Open quantopian/zipline/zipline/finance/risk/risk.py/downside_risk/swapped operands of `<=`