
    4[gK                     V    d dl Z ej                  e      j                  Zd Zd Zd Zy)    Nc                      t        |       dk(  rt        d      t        d | D              }t        d | D              }dt        z  t        |d      z  |z  S )a>  
    Get a relative tolerance for a set of arrays.

    Parameters
    ----------
    *arrays: tuple
        Set of `numpy.ndarray` to get the tolerance for.

    Returns
    -------
    float
        Relative tolerance for the set of arrays.

    Raises
    ------
    ValueError
        If no array is provided.
    r   z$At least one array must be provided.c              3   4   K   | ]  }|j                     y w)N)size.0arrays     W/var/www/html/bid-api/venv/lib/python3.12/site-packages/scipy/_lib/cobyqa/utils/math.py	<genexpr>z!get_arrays_tol.<locals>.<genexpr>   s     .veuzzvs   c           	   3      K   | ]D  }t        j                  t        j                  |t        j                  |               d        F yw)      ?)initialN)npmaxabsisfiniter   s     r	   r
   z!get_arrays_tol.<locals>.<genexpr>   s=      E 	rvveBKK./0#>>s   A
Ag      $@r   )len
ValueErrorr   EPS)arraysr   weights      r	   get_arrays_tolr      s_    & 6{a?@@.v..D  F #:D#&//    c                     t        j                  t        j                  |             j                  t              } | j
                  dk7  rt        |      | S )a'  
    Preprocess a 1-dimensional array.

    Parameters
    ----------
    x : array_like
        Array to be preprocessed.
    message : str
        Error message if `x` cannot be interpreter as a 1-dimensional array.

    Returns
    -------
    `numpy.ndarray`
        Preprocessed array.
       )r   
atleast_1dsqueezeastypefloatndimr   xmessages     r	   exact_1d_arrayr#   $   s@      	bjjm$++E2Avv{!!Hr   c                     t        j                  |       j                  t              } | j                  dk7  rt        |      | S )a'  
    Preprocess a 2-dimensional array.

    Parameters
    ----------
    x : array_like
        Array to be preprocessed.
    message : str
        Error message if `x` cannot be interpreter as a 2-dimensional array.

    Returns
    -------
    `numpy.ndarray`
        Preprocessed array.
       )r   
atleast_2dr   r   r   r   r    s     r	   exact_2d_arrayr'   :   s8      	a&Avv{!!Hr   )	numpyr   finfor   epsr   r   r#   r'    r   r	   <module>r,      s.     bhhuo0:,r   