← Back
Editing: _direct_py.cpython-311.pyc
� d�cT. � � � d dl mZ d dlmZmZmZmZmZmZm Z d dl Zd dlm Z ddlmZmZ ddlmZ erd dlmZ d dlmZ d gZd ZdZdd dddej d dddd� d*d)�ZdS )+� )�annotations)�Any�Callable�Iterable�Optional�Tuple� TYPE_CHECKING�UnionN)�OptimizeResult� )�old_bound_to_new�Bounds)�direct)�NoneTyper )z<Number of function evaluations done is larger than maxfun={}z.Number of iterations is larger than maxiter={}zu[i] < l[i] for some izmaxfun is too largezInitialization failedz7There was an error in the creation of the sample pointsz/An error occured while the function was sampledz*Maximum number of levels has been reached.zForced stopzInvalid argumentsz Out of memory)z_The best function value found is within a relative error={} of the (known) global optimum f_minz_The volume of the hyperrectangle containing the lowest function value found is below vol_tol={}zlThe side length measure of the hyperrectangle containing the lowest function value found is below len_tol={}� g-C��6?�� Tg��ؗ�Ҝ<g���ư>) �args�eps�maxfun�maxiter�locally_biased�f_min� f_min_rtol�vol_tol�len_tol�callback�func�,Callable[[npt.ArrayLike, Tuple[Any]], float]�bounds�Union[Iterable, Bounds]r �tupler �floatr �Union[int, None]r �intr �boolr r r r r �-Optional[Callable[[npt.ArrayLike], NoneType]]�returnr c �� � � t |t � � s^t |t � � st |t � � r#t |� � \ }} t || � � }nd}t |� � �t j |j t j �� � }t j |j t j �� � } t j || k � � st d� � �t j t j |� � � � s&t j t j | � � � � rt d� � �| dk s| dk rt d� � �| dk s| dk rt d� � �|dk s|dk rt d � � �|�d|j d z }t |t � � st d� � �|dk rt d � � �t |t � � st d� � �|dk rt d� � �t |t � � st d� � �d� fd� }t# |t j |� � t j | � � |d||||||| | |� � \ }}}}}|||| | f}|dk r-t&