Constant cost function used by default: cost = 1, d_cost = 0.

def constant_cost_withGradients(x):
    """
    Constant cost function used by default: cost = 1, d_cost = 0.
    """
    return np.ones(x.shape[0])[:,None], np.zeros(x.shape)