Suppose
def evaluateFunc(params): ... return err, grad
where params is a vector of N real value
params
N