def prox_max(X, step, thresh=0):
    """Projection onto numbers below `thresh`
    """
    thresh_ = _step_gamma(step, thresh)
    above = X - thresh_ > 0
    X[above] = thresh_
    return X
Projection onto numbers below `thresh`