Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4cd7a50f48
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (12 sloc) 0.353 kb
import numpy
def jacobian(ffcn, x, epsilon = 10**-8):
Computes the Jacobian of the function ffcn by finite differences in point x.
N = numpy.size(x)
xv = numpy.zeros((N,N))
V = epsilon * numpy.eye(N)
for n in range(N):
xv[:,n] = x
J = (ffcn(xv + V) - ffcn(xv))/epsilon
return J
Jump to Line
Something went wrong with that request. Please try again.