o
    Ö­jZa  ã                   @   s´   d dl Zd dlmZ ddlmZmZ ddlm	Z	 d dl
mZ d dlmZ d dlmZ dZdd
d„Zddd„Zddd„ZG dd„ dƒZG dd„ dƒZG dd„ dƒZG dd„ deƒZdS )é    Né   )Úapprox_derivativeÚgroup_columns)ÚHessianUpdateStrategy)ÚLinearOperator)Úarray_namespace)Úarray_api_extra)z2-pointz3-pointÚcs© c                    s   dg‰‡ ‡‡fdd„}|ˆfS )Nr   c              
      sp   ˆd  d7  < ˆt  | ¡gˆ ¢R Ž }t  |¡s6z
t  |¡ ¡ }W |S  ttfy5 } ztdƒ|‚d }~ww |S )Nr   r   z@The user-provided objective function must return a scalar value.)ÚnpÚcopyÚisscalarÚasarrayÚitemÚ	TypeErrorÚ
ValueError)ÚxÚfxÚe©ÚargsÚfunÚncallsr
   úe/var/www/html/CropPilot/venv/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.pyÚwrapped   s   
ûÿý€ÿz_wrapper_fun.<locals>.wrappedr
   )r   r   r   r
   r   r   Ú_wrapper_fun   s   r   c                    sL   dg‰t ˆƒr‡ ‡‡fdd„}|ˆfS ˆtv r$d‡‡‡fdd„	}|ˆfS d S )Nr   c                    s,   ˆd  d7  < t  ˆt  | ¡gˆ ¢R Ž ¡S ©Nr   r   )r   Ú
atleast_1dr   ©r   Úkwds)r   Úgradr   r
   r   r   '   s   z_wrapper_grad.<locals>.wrappedc                    s&   ˆd  d7  < t ˆ| fd|iˆ ¤ŽS )Nr   r   Úf0©r   ©r   r!   )Úfinite_diff_optionsr   r   r
   r   Úwrapped1.   s   ÿÿÿz_wrapper_grad.<locals>.wrapped1©N)ÚcallableÚ
FD_METHODS)r    r   r   r$   r   r%   r
   )r   r$   r   r    r   r   Ú_wrapper_grad#   s   ùr)   c                    s¼   t ˆƒrHˆt |¡gˆ ¢R Ž }dg‰t |¡r%‡ ‡‡fdd„}t |¡}nt|tƒr3‡ ‡‡fdd„}n‡ ‡‡fdd„}t t 	|¡¡}|ˆ|fS ˆt
v r\dg‰d	‡‡fdd„	}|ˆd fS d S )
Nr   c                    s,   ˆd  d7  < t  ˆt | ¡gˆ ¢R Ž ¡S r   )ÚspsÚ
csr_matrixr   r   r   ©r   Úhessr   r
   r   r   =   s   z_wrapper_hess.<locals>.wrappedc                    s&   ˆd  d7  < ˆt  | ¡gˆ ¢R Ž S r   )r   r   r   r,   r
   r   r   D   s   c                    s2   ˆd  d7  < t  t  ˆt  | ¡gˆ ¢R Ž ¡¡S r   )r   Ú
atleast_2dr   r   r   r,   r
   r   r   I   s   "r   c                    s   t ˆ| fd|iˆ ¤ŽS ©Nr!   r"   r#   )r$   r    r
   r   r%   S   s   ÿÿÿz_wrapper_hess.<locals>.wrapped1r&   )r'   r   r   r*   Úissparser+   Ú
isinstancer   r.   r   r(   )r-   r    Úx0r   r$   ÚHr   r%   r
   )r   r$   r    r-   r   r   Ú_wrapper_hess7   s    



ør4   c                   @   s€   e Zd ZdZ	ddd„Zedd„ ƒZedd„ ƒZed	d
„ ƒZdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )ÚScalarFunctiona©  Scalar function and its derivatives.

    This class defines a scalar function F: R^n->R and methods for
    computing or approximating its first and second derivatives.

    Parameters
    ----------
    fun : callable
        evaluates the scalar function. Must be of the form ``fun(x, *args)``,
        where ``x`` is the argument in the form of a 1-D array and ``args`` is
        a tuple of any additional fixed parameters needed to completely specify
        the function. Should return a scalar.
    x0 : array-like
        Provides an initial set of variables for evaluating fun. Array of real
        elements of size (n,), where 'n' is the number of independent
        variables.
    args : tuple, optional
        Any additional fixed parameters needed to completely specify the scalar
        function.
    grad : {callable, '2-point', '3-point', 'cs'}
        Method for computing the gradient vector.
        If it is a callable, it should be a function that returns the gradient
        vector:

            ``grad(x, *args) -> array_like, shape (n,)``

        where ``x`` is an array with shape (n,) and ``args`` is a tuple with
        the fixed parameters.
        Alternatively, the keywords  {'2-point', '3-point', 'cs'} can be used
        to select a finite difference scheme for numerical estimation of the
        gradient with a relative step size. These finite difference schemes
        obey any specified `bounds`.
    hess : {callable, '2-point', '3-point', 'cs', HessianUpdateStrategy}
        Method for computing the Hessian matrix. If it is callable, it should
        return the  Hessian matrix:

            ``hess(x, *args) -> {LinearOperator, spmatrix, array}, (n, n)``

        where x is a (n,) ndarray and `args` is a tuple with the fixed
        parameters. Alternatively, the keywords {'2-point', '3-point', 'cs'}
        select a finite difference scheme for numerical estimation. Or, objects
        implementing `HessianUpdateStrategy` interface can be used to
        approximate the Hessian.
        Whenever the gradient is estimated via finite-differences, the Hessian
        cannot be estimated with options {'2-point', '3-point', 'cs'} and needs
        to be estimated using one of the quasi-Newton strategies.
    finite_diff_rel_step : None or array_like
        Relative step size to use. The absolute step size is computed as
        ``h = finite_diff_rel_step * sign(x0) * max(1, abs(x0))``, possibly
        adjusted to fit into the bounds. For ``method='3-point'`` the sign
        of `h` is ignored. If None then finite_diff_rel_step is selected
        automatically,
    finite_diff_bounds : tuple of array_like
        Lower and upper bounds on independent variables. Defaults to no bounds,
        (-np.inf, np.inf). Each bound must match the size of `x0` or be a
        scalar, in the latter case the bound will be the same for all
        variables. Use it to limit the range of function evaluation.
    epsilon : None or array_like, optional
        Absolute step size to use, possibly adjusted to fit into the bounds.
        For ``method='3-point'`` the sign of `epsilon` is ignored. By default
        relative steps are used, only if ``epsilon is not None`` are absolute
        steps used.

    Notes
    -----
    This class implements a memoization logic. There are methods `fun`,
    `grad`, hess` and corresponding attributes `f`, `g` and `H`. The following
    things should be considered:

        1. Use only public methods `fun`, `grad` and `hess`.
        2. After one of the methods is called, the corresponding attribute
           will be set. However, a subsequent call with a different argument
           of *any* of the methods may overwrite the attribute.
    Nc	                 C   sF  t |ƒs|tvrtdt› d�ƒ‚t |ƒs%|tv s%t|tƒs%tdt› d�ƒ‚|tv r1|tv r1tdƒ‚t|ƒ | _}	tj|	 	|¡d|	d�}
|	j
}|	 |
jd¡rP|
j}t||d�\| _| _|| _|| _|| _|| _|	 |
|¡| _|| _| jj| _d	| _d	| _d	| _d | _tj| _i }|tv r›||d
< ||d< ||d< ||d< |tv r¯||d
< ||d< ||d< d|d< |   ¡  t!|| j||d�\| _"| _#|  $¡  t |ƒrÚt%|||d�\| _&| _'| _(d| _d S |tv �rt%|| j"||d�\| _&| _'| _(|  $¡  | j&| j| j)d�| _(d| _d S t|tƒ�r!|| _(| j( *| jd¡ d| _d | _+d | _,dg| _'d S d S )Nz)`grad` must be either callable or one of Ú.z@`hess` must be either callable, HessianUpdateStrategy or one of z‹Whenever the gradient is estimated via finite-differences, we require the Hessian to be estimated using one of the quasi-Newton strategies.r   ©ÚndimÚxpúreal floating)r   FÚmethodÚrel_stepÚabs_stepÚboundsTÚas_linear_operator)r   r   r$   )r2   r   )r    r2   r$   ©r!   r-   r   )-r'   r(   r   r1   r   r   r9   ÚxpxÚ
atleast_ndr   Úfloat64ÚisdtypeÚdtyper   Ú_wrapped_funÚ_nfevÚ	_orig_funÚ
_orig_gradÚ
_orig_hessÚ_argsÚastyper   Úx_dtypeÚsizeÚnÚ	f_updatedÚ	g_updatedÚ	H_updatedÚ	_lowest_xr   ÚinfÚ	_lowest_fÚ_update_funr)   Ú_wrapped_gradÚ_ngevÚ_update_gradr4   Ú_wrapped_hessÚ_nhevr3   ÚgÚ
initializeÚx_prevÚg_prev)Úselfr   r2   r   r    r-   Úfinite_diff_rel_stepÚfinite_diff_boundsÚepsilonr9   Ú_xÚ_dtyper$   r
   r
   r   Ú__init__¦   s”   
ÿÿÿÿ
üÿ

ü
úzScalarFunction.__init__c                 C   ó
   | j d S ©Nr   )rG   ©r`   r
   r
   r   Únfev  ó   
zScalarFunction.nfevc                 C   rg   rh   )rX   ri   r
   r
   r   Úngev  rk   zScalarFunction.ngevc                 C   rg   rh   )r[   ri   r
   r
   r   Únhev
  rk   zScalarFunction.nhevc                 C   s°   t | jtƒr7|  ¡  | j| _| j| _tj	| j
 |¡d| j
d�}| j
 || j¡| _d| _d| _d| _|  ¡  d S tj	| j
 |¡d| j
d�}| j
 || j¡| _d| _d| _d| _d S ©Nr   r7   F)r1   rJ   r   rY   r   r^   r\   r_   rA   rB   r9   r   rL   rM   rP   rQ   rR   Ú_update_hess©r`   r   rd   r
   r
   r   Ú	_update_x  s   
zScalarFunction._update_xc                 C   s>   | j s|  | j¡}|| jk r| j| _|| _|| _d| _ d S d S ©NT)rP   rF   r   rU   rS   Úf)r`   r   r
   r
   r   rV   %  s   

ùzScalarFunction._update_func                 C   s:   | j s| jtv r|  ¡  | j| j| jd�| _d| _ d S d S ©Nr@   T)rQ   rI   r(   rV   rW   r   rs   r\   ri   r
   r
   r   rY   /  s   

üzScalarFunction._update_gradc                 C   s~   | j s=| jtv r|  ¡  | j| j| jd�| _n!t| jt	ƒr1|  ¡  | j 
| j| j | j| j ¡ n|  | j¡| _d| _ d S d S rt   )rR   rJ   r(   rY   rZ   r   r\   r3   r1   r   Úupdater^   r_   ri   r
   r
   r   ro   6  s   
 
özScalarFunction._update_hessc                 C   ó&   t  || j¡s|  |¡ |  ¡  | jS r&   )r   Úarray_equalr   rq   rV   rs   ©r`   r   r
   r
   r   r   C  ó   
zScalarFunction.func                 C   rv   r&   )r   rw   r   rq   rY   r\   rx   r
   r
   r   r    I  ry   zScalarFunction.gradc                 C   rv   r&   )r   rw   r   rq   ro   r3   rx   r
   r
   r   r-   O  ry   zScalarFunction.hessc                 C   s4   t  || j¡s|  |¡ |  ¡  |  ¡  | j| jfS r&   )r   rw   r   rq   rV   rY   rs   r\   rx   r
   r
   r   Úfun_and_gradU  s
   
zScalarFunction.fun_and_gradr&   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__rf   Úpropertyrj   rl   rm   rq   rV   rY   ro   r   r    r-   rz   r
   r
   r
   r   r5   [   s$    K
ÿ\



r5   c                   @   sX   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Z	dd„ Z
dd„ Zdd„ ZdS )ÚVectorFunctiona‘  Vector function and its derivatives.

    This class defines a vector function F: R^n->R^m and methods for
    computing or approximating its first and second derivatives.

    Notes
    -----
    This class implements a memoization logic. There are methods `fun`,
    `jac`, hess` and corresponding attributes `f`, `J` and `H`. The following
    things should be considered:

        1. Use only public methods `fun`, `jac` and `hess`.
        2. After one of the methods is called, the corresponding attribute
           will be set. However, a subsequent call with a different argument
           of *any* of the methods may overwrite the attribute.
    c	                    s¢  t ˆƒsˆtvrtdt› d�ƒ‚t ˆƒs%ˆtv s%tˆtƒs%tdt› d�ƒ‚ˆtv r1ˆtv r1tdƒ‚t|ƒ ˆ_}	tj|	 	|¡d|	d�}
|	j
}|	 |
jd¡rP|
j}|	 |
|¡ˆ_|ˆ_ˆjjˆ_dˆ_dˆ_dˆ_d	ˆ_d	ˆ_d	ˆ_i ‰ ˆtv r˜ˆˆ d
< |ˆ d< |d ur�t|ƒ}||fˆ d< |ˆ d< t ˆj¡ˆ_ˆtv r¯ˆˆ d
< |ˆ d< dˆ d< t ˆj¡ˆ_ˆtv r»ˆtv r»tdƒ‚‡‡fdd„‰‡‡fdd„}|ˆ_|ƒ  t ˆj¡ˆ_ˆjjˆ_ t ˆƒ�rAˆˆjƒˆ_!dˆ_ˆ jd7  _|sþ|d u �rt" #ˆj!¡�r‡‡fdd„‰t" $ˆj!¡ˆ_!dˆ_%n)t" #ˆj!¡�r(‡‡fdd„‰ˆj! &¡ ˆ_!d	ˆ_%n‡‡fdd„‰t 'ˆj!¡ˆ_!d	ˆ_%‡‡fdd„}ncˆtv �r¤t(ˆˆjfdˆjiˆ ¤Žˆ_!dˆ_|�sf|d u �ryt" #ˆj!¡�ry‡ ‡‡fdd„}t" $ˆj!¡ˆ_!dˆ_%n+t" #ˆj!¡�r’‡ ‡‡fdd„}ˆj! &¡ ˆ_!d	ˆ_%n‡ ‡‡fdd„}t 'ˆj!¡ˆ_!d	ˆ_%|ˆ_)t ˆƒ�rüˆˆjˆjƒˆ_*dˆ_ˆ jd7  _t" #ˆj*¡�rÔ‡‡fdd„‰t" $ˆj*¡ˆ_*n tˆj*t+ƒ�rã‡‡fd d„‰n‡‡fd!d„‰t 't 	ˆj*¡¡ˆ_*‡‡fd"d#„}n:ˆtv �r‡fd$d%„‰‡ ‡‡fd&d#„}|ƒ  dˆ_n tˆtƒ�r6ˆˆ_*ˆj* ,ˆjd'¡ dˆ_d ˆ_-d ˆ_.‡fd(d#„}|ˆ_/tˆtƒ�rF‡fd)d*„}n‡fd+d*„}|ˆ_0d S ),Nz(`jac` must be either callable or one of r6   z?`hess` must be either callable,HessianUpdateStrategy or one of z‹Whenever the Jacobian is estimated via finite-differences, we require the Hessian to be estimated using one of the quasi-Newton strategies.r   r7   r:   r   Fr;   r<   Úsparsityr>   Tr?   c                    ó   ˆ j d7  _ t ˆ | ƒ¡S ©Nr   )rj   r   r   ©r   )r   r`   r
   r   Úfun_wrapped§  ó   z,VectorFunction.__init__.<locals>.fun_wrappedc                      ó   ˆ ˆj ƒˆ_d S r&   )r   rs   r
   )r…   r`   r
   r   Ú
update_fun«  ó   z+VectorFunction.__init__.<locals>.update_func                    r‚   rƒ   )Únjevr*   r+   r„   ©Újacr`   r
   r   Újac_wrapped¼  r†   z,VectorFunction.__init__.<locals>.jac_wrappedc                    s   ˆ j d7  _ ˆ | ƒ ¡ S rƒ   )rŠ   Útoarrayr„   r‹   r
   r   r�   Ã  s   c                    r‚   rƒ   )rŠ   r   r.   r„   r‹   r
   r   r�   Ê  r†   c                      r‡   r&   )r   ÚJr
   )r�   r`   r
   r   Ú
update_jacÐ  r‰   z+VectorFunction.__init__.<locals>.update_jacr!   c                      ó.   ˆ  ¡  t tˆˆjfdˆjiˆ ¤Ž¡ˆ_d S r/   )rV   r*   r+   r   r   rs   r�   r
   ©r$   r…   r`   r
   r   r�   Ú  ó   ÿ
ÿc                      s,   ˆ  ¡  tˆˆjfdˆjiˆ ¤Ž ¡ ˆ_d S r/   )rV   r   r   rs   rŽ   r�   r
   r’   r
   r   r�   ã  s   ÿÿc                      r‘   r/   )rV   r   r.   r   r   rs   r�   r
   r’   r
   r   r�   ë  r“   c                    s   ˆ j d7  _ t ˆ | |ƒ¡S rƒ   )rm   r*   r+   ©r   Úv©r-   r`   r
   r   Úhess_wrappedü  s   z-VectorFunction.__init__.<locals>.hess_wrappedc                    s   ˆ j d7  _ ˆ | |ƒS rƒ   )rm   r”   r–   r
   r   r—     s   
c                    s$   ˆ j d7  _ t t ˆ | |ƒ¡¡S rƒ   )rm   r   r.   r   r”   r–   r
   r   r—     s   c                      s   ˆ ˆj ˆjƒˆ_d S r&   )r   r•   r3   r
   )r—   r`   r
   r   Úupdate_hess  s   z,VectorFunction.__init__.<locals>.update_hessc                    s   ˆ | ƒj  |¡S r&   )ÚTÚdotr”   )r�   r
   r   Ú	jac_dot_v  r‰   z*VectorFunction.__init__.<locals>.jac_dot_vc                      s8   ˆ  ¡  tˆˆjfˆjj ˆj¡ˆjfdœˆ ¤Žˆ_d S )N)r!   r   )Ú_update_jacr   r   r�   r™   rš   r•   r3   r
   )r$   r›   r`   r
   r   r˜     s   
þýr-   c                     sb   ˆ   ¡  ˆ jd ur-ˆ jd ur/ˆ jˆ j } ˆ jj ˆ j¡ˆ jj ˆ j¡ }ˆ j 	| |¡ d S d S d S r&   )
rœ   r^   ÚJ_prevr   r�   r™   rš   r•   r3   ru   )Údelta_xÚdelta_gri   r
   r   r˜   !  s    ýc                    sb   ˆ   ¡  ˆ jˆ _ˆ jˆ _tjˆ j | ¡dˆ jd�}ˆ j 	|ˆ j
¡ˆ _dˆ _dˆ _dˆ _ˆ  ¡  d S rn   )rœ   r   r^   r�   r�   rA   rB   r9   r   rL   rM   rP   Ú	J_updatedrR   ro   ©r   rd   ri   r
   r   Úupdate_x-  s   z)VectorFunction.__init__.<locals>.update_xc                    sB   t jˆ j | ¡dˆ jd�}ˆ j |ˆ j¡ˆ _dˆ _dˆ _dˆ _	d S rn   )
rA   rB   r9   r   rL   rM   r   rP   r    rR   r¡   ri   r
   r   r¢   8  s
   
)1r'   r(   r   r1   r   r   r9   rA   rB   r   rC   rD   rE   rL   r   rM   rN   rO   rj   rŠ   rm   rP   r    rR   r   r   r   Úx_diffÚ_update_fun_implÚ
zeros_likers   r•   Úmr�   r*   r0   r+   Úsparse_jacobianrŽ   r.   r   Ú_update_jac_implr3   r   r]   r^   r�   Ú_update_hess_implÚ_update_x_impl)r`   r   r2   rŒ   r-   ra   Úfinite_diff_jac_sparsityrb   r§   r9   rd   re   Úsparsity_groupsrˆ   r�   r˜   r¢   r
   )	r$   r   r…   r-   r—   rŒ   r›   r�   r`   r   rf   n  sà   ÿ
ÿ
ÿ


ÿ

	
zVectorFunction.__init__c                 C   s"   t  || j¡s|| _d| _d S d S )NF)r   rw   r•   rR   )r`   r•   r
   r
   r   Ú	_update_vA  s   
þzVectorFunction._update_vc                 C   s    t  || j¡s|  |¡ d S d S r&   )r   rw   r   rª   rx   r
   r
   r   rq   F  s   ÿzVectorFunction._update_xc                 C   ó   | j s|  ¡  d| _ d S d S rr   )rP   r¤   ri   r
   r
   r   rV   J  ó   
þzVectorFunction._update_func                 C   r®   rr   )r    r¨   ri   r
   r
   r   rœ   O  r¯   zVectorFunction._update_jacc                 C   r®   rr   )rR   r©   ri   r
   r
   r   ro   T  r¯   zVectorFunction._update_hessc                 C   ó   |   |¡ |  ¡  | jS r&   )rq   rV   rs   rx   r
   r
   r   r   Y  ó   
zVectorFunction.func                 C   r°   r&   )rq   rœ   r�   rx   r
   r
   r   rŒ   ^  r±   zVectorFunction.jacc                 C   s"   |   |¡ |  |¡ |  ¡  | jS r&   )r­   rq   ro   r3   ©r`   r   r•   r
   r
   r   r-   c  s   

zVectorFunction.hessN)r{   r|   r}   r~   rf   r­   rq   rV   rœ   ro   r   rŒ   r-   r
   r
   r
   r   r€   ]  s     Tr€   c                   @   s8   e Zd ZdZdd„ Zdd„ Zdd„ Zdd	„ Zd
d„ ZdS )ÚLinearVectorFunctionzüLinear vector function and its derivatives.

    Defines a linear function F = A x, where x is N-D vector and
    A is m-by-n matrix. The Jacobian is constant and equals to A. The Hessian
    is identically zero and it is returned as a csr matrix.
    c                 C   s   |s|d u rt  |¡rt  |¡| _d| _nt  |¡r#| ¡ | _d| _nt t |¡¡| _d| _| jj	\| _
| _t|ƒ | _}tj| |¡d|d�}|j}| |jd¡rV|j}| ||¡| _|| _| j | j¡| _d| _tj| j
td�| _t  | j| jf¡| _d S )NTFr   r7   r:   )rE   )r*   r0   r+   r�   r§   rŽ   r   r.   r   Úshaper¦   rO   r   r9   rA   rB   rC   rD   rE   rL   r   rM   rš   rs   rP   ÚzerosÚfloatr•   r3   )r`   ÚAr2   r§   r9   rd   re   r
   r
   r   rf   r  s(   

zLinearVectorFunction.__init__c                 C   sH   t  || j¡s"tj| j |¡d| jd�}| j || j¡| _d| _	d S d S rn   )
r   rw   r   rA   rB   r9   r   rL   rM   rP   rp   r
   r
   r   rq   �  s
   
ýzLinearVectorFunction._update_xc                 C   s*   |   |¡ | js| j |¡| _d| _| jS rr   )rq   rP   r�   rš   rs   rx   r
   r
   r   r   –  s
   
zLinearVectorFunction.func                 C   s   |   |¡ | jS r&   )rq   r�   rx   r
   r
   r   rŒ   �  s   
zLinearVectorFunction.jacc                 C   s   |   |¡ || _| jS r&   )rq   r•   r3   r²   r
   r
   r   r-   ¡  s   
zLinearVectorFunction.hessN)	r{   r|   r}   r~   rf   rq   r   rŒ   r-   r
   r
   r
   r   r³   k  s    r³   c                       s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚIdentityVectorFunctionzþIdentity vector function and its derivatives.

    The Jacobian is the identity matrix, returned as a dense array when
    `sparse_jacobian=False` and as a csr matrix otherwise. The Hessian is
    identically zero and it is returned as a csr matrix.
    c                    sJ   t |ƒ}|s
|d u rtj|dd�}d}nt |¡}d}tƒ  |||¡ d S )NÚcsr)ÚformatTF)Úlenr*   Úeyer   Úsuperrf   )r`   r2   r§   rO   r·   ©Ú	__class__r
   r   rf   ®  s   
zIdentityVectorFunction.__init__)r{   r|   r}   r~   rf   Ú__classcell__r
   r
   r¾   r   r¸   §  s    r¸   )r
   )Nr
   N)NNr
   N)Únumpyr   Úscipy.sparseÚsparser*   Ú_numdiffr   r   Ú_hessian_update_strategyr   Úscipy.sparse.linalgr   Úscipy._lib._array_apir   Ú
scipy._libr   rA   r(   r   r)   r4   r5   r€   r³   r¸   r
   r
   r
   r   Ú<module>   s&    


$    <