def _minimize_trust_ncg(fun, x0, args=(), jac=None, hess=None, hessp=None, **trust_region_options):
 if (jac is None):
  raise ValueError('Jacobian is required for Newton-CG trust-region minimization')
 if ((hess is None) and (hessp is None)):
  raise ValueError('Either the Hessian or the Hessian-vector product is required for Newton-CG trust-region minimization')
 return _minimize_trust_region(fun, x0, args=args, jac=jac, hess=hess, hessp=hessp, subproblem=CGSteihaugSubproblem, **trust_region_options)

def _minimize_trust_ncg ( fun , x0 , args = ( ) , jac = None , hess = None , hessp = None , ** trust_region_options ) : if ( jac is None ) : raise ValueError ( 'Jacobian is required for Newton-CG trust-region minimization' ) if ( ( hess is None ) and ( hessp is None ) ) : raise ValueError ( 'Either the Hessian or the Hessian-vector product is required for Newton-CG trust-region minimization' ) return _minimize_trust_region ( fun , x0 , args = args , jac = jac , hess = hess , hessp = hessp , subproblem = CGSteihaugSubproblem , ** trust_region_options )
minimization of scalar function of one or more variables using the newton conjugate gradient trust-region algorithm .