projected gradient descent python