MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / F

Function F

code/optim/bridge_nonlinear_roots.py:31–34  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

29# }}}
30import scipy.optimize as so
31def F(x):
32 return x[0]+x[1]+ x[2]-1 - (x[0]**2+ x[1]**2+x[2]**2-1), \
33 x[0]+x[1]+x[2]-1 - (x[0]**2+4*x[1]**2+x[2]**2-2), \
34 (x[0]**2+x[1]**2+x[2]**2-1) - (x[0]**2+4*x[1]**2+x[2]**2-2)
35
36def F_roots(guess=[0,0,0]):
37 return so.root(F, guess)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected