o
    ?Hh                     @   s0   d dl mZ d dlmZ dgZ		dddZdS )	   )_minimize_trust_region)get_trlib_quadratic_subproblem_minimize_trust_krylov NTc                 K   s   |du r	t dd|du r|du rt d|r/t| |f||||tdd|ddd	d
|S t| |f||||tdd|ddd	d
|S )a  
    Minimization of a scalar function of one or more variables using
    a nearly exact trust-region algorithm that only requires matrix
    vector products with the hessian matrix.

    .. versionadded:: 1.0.0

    Options
    -------
    inexact : bool, optional
        Accuracy to solve subproblems. If True requires less nonlinear
        iterations, but more vector products.
    Nz&Jacobian is required for trust region zexact minimization.zaEither the Hessian or the Hessian-vector product is required for Krylov trust-region minimizationg       g      dispF)	tol_rel_i	tol_rel_br   )argsjachesshessp
subproblemg:0yE>gư>)
ValueErrorr   r   get)funx0r	   r
   r   r   inexacttrust_region_optionsr   r   b/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_krylov.pyr      s2   

)r   NNNT)_trustregionr   _trlibr   __all__r   r   r   r   r   <module>   s    