Non-gradient methods:

Estimating the Gradient Take a step in each direction - method of differences

    def approx_fprime(xk,f,*args):
        f0 = apply(f,(xk,)+args)
        grad = Num.zeros((len(xk),),'d')
        ei = Num.zeros((len(xk),),'d')
        for k in range(len(xk)):
            ei[k] = 1.0
            grad[k] = (apply(f,(xk+epsilon*ei,)+args) - f0)/epsilon
            ei[k] = 0.0
        return grad

Can do the same thing with randomized vectors Don't get stuck becuase some partials are not good