o
    Ö­jÖ  ã                   @   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:Œ0âŽyE>g�íµ ÷Æ°>)Ú
ValueErrorr   r   Úget)ÚfunÚx0r	   r
   r   r   ÚinexactÚtrust_region_optionsr   r   ú_/var/www/html/CropPilot/venv/lib/python3.10/site-packages/scipy/optimize/_trustregion_krylov.pyr      s2   ÿ
þþú
þþú)r   NNNT)Ú_trustregionr   Ú_trlibr   Ú__all__r   r   r   r   r   Ú<module>   s    ÿ