
    Џkhd                         d dl Zd dlmZ d Zy)    N)Boundsc           
      V   | st        j                  t         j                   g|z  t         j                        }t        j                  t         j                  g|z  t         j                        }||fS t	        | t
              rt        j                  | j                  t         j                        }t        j                  | j                  t         j                        }t        j                  |t         j                   t        j                  |t        |      z
        z  f      }t        j                  |t         j                  t        j                  |t        |      z
        z  f      }||fS t        j                  | D cg c]  }|d   |d   nt         j                    c}t         j                        }t        j                  | D cg c]  }|d   |d   nt         j                   c}t         j                        }t        j                  |t         j                   t        j                  |t        |      z
        z  f      }t        j                  |t         j                  t        j                  |t        |      z
        z  f      }||fS c c}w c c}w )a  
    `bounds` can either be an object with the properties lb and ub, or a list of tuples
    indicating a lower bound and an upper bound for each variable. If the list contains
    fewer entries than the length of x0, the remaining entries will generated as -/+ infinity.
    Some examples of valid lists of tuple, assuming len(x0) == 3:
    [(0, 1), (2, 3), (4, 5)] -> returns [0, 2, 4], [1, 3, 5]
    [(0, 1), (None, 3)]      -> returns [0, -inf, -inf], [1, 3, inf]
    [(0, 1), (-np.inf, 3)]   -> returns [0, -inf, -inf], [1, 3, inf]
    )dtyper      )nparrayinffloat64
isinstancer   lbubconcatenateoneslen)boundslenx0r   r   bounds        ]/var/www/teggl/fontify/venv/lib/python3.12/site-packages/scipy/_lib/pyprima/common/_bounds.pyprocess_boundsr      s    ~XXwioRZZ8XXrvvhunBJJ72v&&!XXfiirzz2XXfiirzz2^^R"&&R)A!ABC^^RB(@!@AB2v 
fUUuQx358"&&@U]_]g]g	hB	VTEuQx358?T\^\f\f	gB	bffWRWWUSW_%==>	?B	RVVBGGECGO$<<=	>Br6M VTs   
"J!!J&)numpyr   scipy.optimizer   r        r   <module>r      s     !r   