§
    ¢éUgè~  ã                   ó  — U d dl Z d dlmZ d dlZd dlZd dlZd dlZd dlmZ d dl	Z	d dl
Z
d dlmZmZmZmZ d dlZd dlmZmZmZ ee         ed<   ee         ed<   ee         ed<   ej                             ej        ¦  «        d	k    rd d
lmZm Z m!Z!m"Z" nd dlmZm Z m!Z! e#Z"eed<   eed<   ej                             ej        ¦  «        dk    rb	  ej$        ¦   «         5   ej%        dde&¦  «         ej'        Z(ej)        Z*ddd¦  «         n# 1 swxY w Y   n'# e+$ r ej,        Z(ej-        Z*Y nw xY wej,        Z(ej-        Z*ee.ej/        f         Z0ee1ej2        ej/        f         Z3ee4         ed<   ej                             ej        ¦  «        dk    rdZ5n\ej                             ej        ¦  «        dk     rdZ5n6	  ej6        dg¦  «         7                    d¬¦  «         dZ5n# e#$ r dZ5Y nw xY werNeee0ej8        j9        ej8        j:        f                  Z; edeej8        j9        ej8        j:        f         ¬¦  «        Z<	 d dl=m9Z9 n# e>$ r  G d„ d¦  «        Z9Y nw xY wdDd„Z?dEd„Z@e1ddfd„ZAd „ ZBd!e.d"e1fd#„ZCd$„ ZD	 	 	 dFd&„ZEdGd'„ZF ed(g d)¢¦  «        ZGd*„ ZH G d+„ d,¦  «        ZI G d-„ d.¦  «        ZJ	 	 dHd0„ZKedId2„¦   «         ZLd3„ ZMdJd4„ZNd5„ ZOdKd6„ZPdLdd8œd9„ZQdGd:„ZRd;„ ZSdd8œd<„ZTd=„ ZUd>„ ZV G d?„ d@eW¦  «        ZXdEdA„ZYdB„ ZZdMdC„Z[dS )Né    N)Úcontextmanager)Ú
namedtuple)ÚOptionalÚUnionÚTYPE_CHECKINGÚTypeVar)Úarray_namespaceÚis_numpyÚsizeÚ	AxisErrorÚComplexWarningÚVisibleDeprecationWarningz1.25.0)r   r   r   ÚDTypePromotionError)r   r   r   Únp_longÚnp_ulongz
2.0.0.dev0Úignorez/.*In the future `np\.long` will be defined as.*Úcopy_if_neededz2.0.0z1.28.0Fé   ©ÚcopyÚGeneratorType)Úbound)Ú	Generatorc                   ó   — e Zd ZdS )r   N)Ú__name__Ú
__module__Ú__qualname__© ó    úO/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/scipy/_lib/_util.pyr   r   T   s   € € € € € Øˆr   r   c                 ó¸  ‡ ‡— t          ‰ g|¢R Ž }||cxu r�n |�|�t          d¦  «        ‚ |j        ‰ g|¢R Ž }|                     dg¦  «        j        }|                     |d         |d¬¦  «        |dd…         cŠ }|                      |ˆ fd„|D ¦   «         Ž ¦  «        }|€S|                     |¦  «        }|                     |j        |j        ¦  «        }	|                     ‰ j        ||	¬	¦  «        }
n^‰  Š|                      |ˆfd
„|D ¦   «         Ž ¦  «        }|                     ||¦  «        }	| 	                    ‰ j        |	¬¦  «        }
||
‰<   ||
‰ <   |
S )aÏ  Return elements chosen from two possibilities depending on a condition

    Equivalent to ``f(*arrays) if cond else fillvalue`` performed elementwise.

    Parameters
    ----------
    cond : array
        The condition (expressed as a boolean array).
    arrays : tuple of array
        Arguments to `f` (and `f2`). Must be broadcastable with `cond`.
    f : callable
        Where `cond` is True, output will be ``f(arr1[cond], arr2[cond], ...)``
    fillvalue : object
        If provided, value with which to fill output array where `cond` is
        not True.
    f2 : callable
        If provided, output will be ``f2(arr1[cond], arr2[cond], ...)`` where
        `cond` is not True.

    Returns
    -------
    out : array
        An array with elements from the output of `f` where `cond` is True
        and `fillvalue` (or elements from the output of `f2`) elsewhere. The
        returned array has data type determined by Type Promotion Rules
        with the output of `f` and `fillvalue` (or the output of `f2`).

    Notes
    -----
    ``xp.where(cond, x, fillvalue)`` requires explicitly forming `x` even where
    `cond` is False. This function evaluates ``f(arr1[cond], arr2[cond], ...)``
    onle where `cond` ``is True.

    Examples
    --------
    >>> import numpy as np
    >>> a, b = np.array([1, 2, 3, 4]), np.array([5, 6, 7, 8])
    >>> def f(a, b):
    ...     return a*b
    >>> _lazywhere(a > 2, (a, b), f, np.nan)
    array([ nan,  nan,  21.,  32.])

    Nz1Exactly one of `fillvalue` or `f2` must be given.Tr   Fr   r   c              3   ó(   •K  — | ]}|‰         V — Œd S ©Nr   ©Ú.0ÚarrÚconds     €r    ú	<genexpr>z_lazywhere.<locals>.<genexpr>�   s'   øè è € Ð7Ð7¨˜3˜tœ9Ð7Ð7Ð7Ð7Ð7Ð7r   ©Ú
fill_valueÚdtypec              3   ó(   •K  — | ]}|‰         V — Œd S r#   r   )r%   r&   Únconds     €r    r(   z_lazywhere.<locals>.<genexpr>•   s'   øè è € Ð=Ð=¨s  E¤
Ð=Ð=Ð=Ð=Ð=Ð=r   ©r+   )
r	   Ú
ValueErrorÚbroadcast_arraysÚasarrayr+   ÚastypeÚresult_typeÚfullÚshapeÚempty)r'   ÚarraysÚfÚ	fillvalueÚf2ÚxpÚargsÚ
bool_dtypeÚtemp1r+   ÚoutÚtemp2r-   s   `           @r    Ú
_lazywhererA   X   s‘  øø€ õX 
˜Ð	' Ð	'Ð	'Ð	'€Bà
ˆiÐÐÐÐÐÐÐ R ^¸	Ð8MÝÐLÑMÔMÐMàˆ2Ô˜tÐ- fÐ-Ð-Ð-€DØ—’˜T˜FÑ#Ô#Ô)€JØ—9’9˜T !œW j°u�9Ñ=Ô=¸tÀAÀBÀB¼x€L€Dˆ&à�JŠJ�q�qÐ7Ð7Ð7Ð7°Ð7Ñ7Ô7Ð8Ñ9Ô9€Eà	€zØ—J’J˜yÑ)Ô)ˆ	Ø—’˜uœ{¨I¬OÑ<Ô<ˆØ�gŠg�d”j¨Y¸eˆgÑDÔDˆˆà�ˆØ—
’
˜2˜2Ð=Ð=Ð=Ð=°fÐ=Ñ=Ô=Ð>Ñ?Ô?ˆØ—’˜u eÑ,Ô,ˆØ�hŠh�t”z¨ˆhÑ/Ô/ˆØˆˆE‰
à€Cˆ�Ià€Jr   c                 ó¼  ‡	— t          j        |Ž }t          j        d„ |D ¦   «         ¦  «        }t          j        t          j        |d         ¦  «        ||¬¦  «        }t          || ¦  «        D ]n\  }Š	t          j        ‰	du ¦  «        rŒt          j        ‰	|d         ¦  «        \  Š	}t          ˆ	fd„|D ¦   «         ¦  «        }t          j        |‰	 ||Ž ¦  «         Œo|S )aZ  
    Mimic `np.select(condlist, choicelist)`.

    Notice, it assumes that all `arrays` are of the same shape or can be
    broadcasted together.

    All functions in `choicelist` must accept array arguments in the order
    given in `arrays` and must return an array of the same shape as broadcasted
    `arrays`.

    Examples
    --------
    >>> import numpy as np
    >>> x = np.arange(6)
    >>> np.select([x <3, x > 3], [x**2, x**3], default=0)
    array([  0,   1,   4,   0,  64, 125])

    >>> _lazyselect([x < 3, x > 3], [lambda x: x**2, lambda x: x**3], (x,))
    array([   0.,    1.,    4.,   0.,   64.,  125.])

    >>> a = -np.ones_like(x)
    >>> _lazyselect([x < 3, x > 3],
    ...             [lambda x, a: x**2, lambda x, a: a * x**3],
    ...             (x, a), default=np.nan)
    array([   0.,    1.,    4.,   nan,  -64., -125.])

    c                 ó&   — g | ]}|j         j        ‘ŒS r   )r+   Úchar)r%   Úas     r    ú
<listcomp>z_lazyselect.<locals>.<listcomp>¼   s   € Ð9Ð9Ð9¨Q˜AœGœLÐ9Ð9Ð9r   r   r)   Fc              3   óB   •K  — | ]}t          j        ‰|¦  «        V — Œd S r#   )ÚnpÚextractr$   s     €r    r(   z_lazyselect.<locals>.<genexpr>Â   s/   øè è € Ð=Ð=¨s•R”Z  cÑ*Ô*Ð=Ð=Ð=Ð=Ð=Ð=r   )	rH   r0   Úmintypecoder4   r5   ÚzipÚallÚtupleÚplace)
ÚcondlistÚ
choicelistr7   ÚdefaultÚtcoder?   ÚfuncÚ_Útempr'   s
            @r    Ú_lazyselectrV   Ÿ   sè   ø€ õ8 Ô  &Ð)€FÝŒNÐ9Ð9°&Ð9Ñ9Ô9Ñ:Ô:€EÝ
Œ'•"”(˜6 !œ9Ñ%Ô%°'ÀÐ
GÑ
GÔ
G€CÝ˜* hÑ/Ô/ð )ð )‰
ˆˆdÝŒ6�$˜%�-Ñ Ô ð 	ØÝÔ% d¨F°1¬IÑ6Ô6‰ˆˆaÝÐ=Ð=Ð=Ð=°fÐ=Ñ=Ô=Ñ=Ô=ˆÝ
Œ��d˜D˜D $˜KÑ(Ô(Ð(Ð(Ø€Jr   ÚCc                 óÊ  — t          j        |¦  «        }|€|j        }t          | d¦  «        s| f} t	          j        t          j        | ¦  «        |j        z  }t          j	        ||z   dz   t           j
        ¦  «        }|j        d         d         |z  }|dk    r||z
  }||||z   dz   …         dd…         }t          j        | |||¬¦  «        }|                     d¦  «         |S )zôAllocate a new ndarray with aligned memory.

    Primary use case for this currently is working around a f2py issue
    in NumPy 1.9.1, where dtype.alignment is such that np.zeros() does
    not necessarily create arrays aligned up to it.

    NÚ__len__r   Údatar   éÿÿÿÿ)Úorder)rH   r+   Ú	alignmentÚhasattrÚ	functoolsÚreduceÚoperatorÚmulÚitemsizer6   Úuint8Ú__array_interface__ÚndarrayÚfill)r5   r+   r\   Úalignr   ÚbufÚoffsetrZ   s           r    Ú_aligned_zerosrk   Ç   sä   € õ ŒH�U‰OŒO€EØ€}Ø”ˆÝ�5˜)Ñ$Ô$ð Ø�ˆÝÔ�HœL¨%Ñ0Ô0°5´>ÑA€DÝ
Œ(�4˜%‘< !Ñ#¥R¤XÑ
.Ô
.€CØÔ$ VÔ,¨QÔ/°%Ñ7€FØ�‚{€{Ø˜‘ˆð ˆf�V˜D‘[ ‘]Ð"Ô
# C R CÔ
(€CÝŒ:�e˜U C¨uÐ5Ñ5Ô5€DØ‡I‚Iˆa�L„L€LØ€Kr   c                 ól   — | j         �,| j        | j         j        dz  k     r|                      ¦   «         S | S )zÅReturn an array equivalent to the input array. If the input
    array is a view of a much larger array, copy its contents to a
    newly allocated array. Otherwise, return the input unchanged.
    Né   )Úbaser   r   )Úarrays    r    Ú_prune_arrayrp   á   s4   € ð
 „zÐ %¤*¨u¬z¬À!Ñ/CÒ"CÐ"CØ�zŠz‰|Œ|ÐØ€Lr   ÚnÚreturnc                 óh   — | dk     r!t          t          j        | ¦  «        ¦  «        nt          j        S )zlCompute the factorial and return as a float

    Returns infinity when result is too large for a double
    é«   )ÚfloatÚmathÚ	factorialrH   Úinf)rq   s    r    Úfloat_factorialry   ë   s+   € ð
 ()¨3¢w w�5•” Ñ"Ô"Ñ#Ô#Ð#µB´FÐ:r   c                 ób  — | �| t           j        u rt           j        j        j        S t	          | t
          j        t           j        f¦  «        rt           j                             | ¦  «        S t	          | t           j        j        t           j        j	        f¦  «        r| S t          d| › d�¦  «        ‚)a`  Turn `seed` into a `np.random.RandomState` instance.

    Parameters
    ----------
    seed : {None, int, `numpy.random.Generator`, `numpy.random.RandomState`}, optional
        If `seed` is None (or `np.random`), the `numpy.random.RandomState`
        singleton is used.
        If `seed` is an int, a new ``RandomState`` instance is used,
        seeded with `seed`.
        If `seed` is already a ``Generator`` or ``RandomState`` instance then
        that instance is used.

    Returns
    -------
    seed : {`numpy.random.Generator`, `numpy.random.RandomState`}
        Random number generator.

    Nú'z<' cannot be used to seed a numpy.random.RandomState instance)rH   ÚrandomÚmtrandÚ_randÚ
isinstanceÚnumbersÚIntegralÚintegerÚRandomStater   r/   )Úseeds    r    Úcheck_random_stater…   õ   s£   € ð& €|�t�rœyÐ(Ð(ÝŒyÔÔ%Ð%Ý�$�Ô)­2¬:Ð6Ñ7Ô7ð +ÝŒy×$Ò$ TÑ*Ô*Ð*Ý�$�œÔ.µ´	Ô0CÐDÑEÔEð Øˆå
ð !˜ð !ð !ð !ñ "ô "ð "r   Tc                 óä  — |s/ddl }|j                             | ¦  «        rd}t          |¦  «        ‚|s.t          j                             | ¦  «        rt          d¦  «        ‚|rt          j        nt          j        } || ¦  «        } |s*| j	        t	          j	        d¦  «        u rt          d¦  «        ‚|r;t	          j
        | j	        t          j        ¦  «        s || t          j        ¬¦  «        } | S )aA  
    Helper function for SciPy argument validation.

    Many SciPy linear algebra functions do support arbitrary array-like
    input arguments. Examples of commonly unsupported inputs include
    matrices containing inf/nan, sparse matrix representations, and
    matrices with complicated elements.

    Parameters
    ----------
    a : array_like
        The array-like input.
    check_finite : bool, optional
        Whether to check that the input matrices contain only finite numbers.
        Disabling may give a performance gain, but may result in problems
        (crashes, non-termination) if the inputs do contain infinities or NaNs.
        Default: True
    sparse_ok : bool, optional
        True if scipy sparse matrices are allowed.
    objects_ok : bool, optional
        True if arrays with dype('O') are allowed.
    mask_ok : bool, optional
        True if masked arrays are allowed.
    as_inexact : bool, optional
        True to convert the input array to a np.inexact dtype.

    Returns
    -------
    ret : ndarray
        The converted validated array.

    r   NzxSparse matrices are not supported by this function. Perhaps one of the scipy.sparse.linalg functions would work instead.zmasked arrays are not supportedÚOzobject arrays are not supportedr.   )Úscipy.sparseÚsparseÚissparser/   rH   ÚmaÚisMaskedArrayÚasarray_chkfiniter1   r+   Ú
issubdtypeÚinexactÚfloat64)	rE   Úcheck_finiteÚ	sparse_okÚ
objects_okÚmask_okÚ
as_inexactÚscipyÚmsgÚtoarrays	            r    Ú_asarray_validatedr™     s   € ðF ð "ØÐÐÐØŒ<× Ò  Ñ#Ô#ð 	"ð)ˆCõ ˜S‘/”/Ð!Øð @ÝŒ5×Ò˜qÑ!Ô!ð 	@ÝÐ>Ñ?Ô?Ð?Ø&2ÐB�bÔ"Ð"½¼
€GØˆ�‰
Œ
€AØð @ØŒ7•b”h˜s‘m”mÐ#Ð#ÝÐ>Ñ?Ô?Ð?Øð -ÝŒ}˜QœW¥b¤jÑ1Ô1ð 	-Ø�˜¥¤Ð,Ñ,Ô,ˆAØ€Hr   c                 ó®   — 	 t          j        | ¦  «        } n!# t          $ r t          |› d�¦  «        d‚w xY w|�| |k     rt          |› d|› �¦  «        d‚| S )a¼  
    Validate a scalar integer.

    This function can be used to validate an argument to a function
    that expects the value to be an integer.  It uses `operator.index`
    to validate the value (so, for example, k=2.0 results in a
    TypeError).

    Parameters
    ----------
    k : int
        The value to be validated.
    name : str
        The name of the parameter.
    minimum : int, optional
        An optional lower bound.
    z must be an integer.Nz" must be an integer not less than )ra   ÚindexÚ	TypeErrorr/   )ÚkÚnameÚminimums      r    Ú_validate_intr    K  s’   € ð$AÝŒN˜1ÑÔˆˆøÝð Að Að AÝ˜4Ð5Ð5Ð5Ñ6Ô6¸DÐ@ðAøøøàÐ˜q 7š{˜{Ý˜Dð +ð +Ø!(ð+ð +ñ ,ô ,Ø15ð	6à€Hs   ‚ —5ÚFullArgSpec)r<   ÚvarargsÚvarkwÚdefaultsÚ
kwonlyargsÚkwonlydefaultsÚannotationsc           	      ó�  — t          j        | ¦  «        }d„ |j                             ¦   «         D ¦   «         }d„ |j                             ¦   «         D ¦   «         }|r|d         nd}d„ |j                             ¦   «         D ¦   «         }|r|d         nd}t	          d„ |j                             ¦   «         D ¦   «         ¦  «        pd}d„ |j                             ¦   «         D ¦   «         }d„ |j                             ¦   «         D ¦   «         }d	„ |j                             ¦   «         D ¦   «         }t          ||||||pd|¦  «        S )
as  inspect.getfullargspec replacement using inspect.signature.

    If func is a bound method, do not list the 'self' parameter.

    Parameters
    ----------
    func : callable
        A callable to inspect

    Returns
    -------
    fullargspec : FullArgSpec(args, varargs, varkw, defaults, kwonlyargs,
                              kwonlydefaults, annotations)

        NOTE: if the first argument of `func` is self, it is *not*, I repeat
        *not*, included in fullargspec.args.
        This is done for consistency between inspect.getargspec() under
        Python 2.x, and inspect.signature() under Python 3.x.

    c                 ón   — g | ]2}|j         t          j        j        t          j        j        fv ¯+|j        ‘Œ3S r   )ÚkindÚinspectÚ	ParameterÚPOSITIONAL_OR_KEYWORDÚPOSITIONAL_ONLYrž   ©r%   Úps     r    rF   z*getfullargspec_no_self.<locals>.<listcomp>�  sO   € ð ð ð ØØŒ6•gÔ'Ô=ÝÔ'Ô7ð9ð 9ð 9ð 	
Œð9ð 9ð 9r   c                 óP   — g | ]#}|j         t          j        j        k    ¯|j        ‘Œ$S r   )rª   r«   r¬   ÚVAR_POSITIONALrž   r¯   s     r    rF   z*getfullargspec_no_self.<locals>.<listcomp>”  s7   € ð ð ð ØØŒ6•WÔ&Ô5Ò5Ð5ð 	
ŒØ5Ð5Ð5r   r   Nc                 óP   — g | ]#}|j         t          j        j        k    ¯|j        ‘Œ$S r   )rª   r«   r¬   ÚVAR_KEYWORDrž   r¯   s     r    rF   z*getfullargspec_no_self.<locals>.<listcomp>™  s7   € ð ð ð ØØŒ6•WÔ&Ô2Ò2Ð2ð 	
ŒØ2Ð2Ð2r   c              3   ót   K  — | ]3}|j         t          j        j        k    r|j        |j        u¯*|j        V — Œ4d S r#   )rª   r«   r¬   r­   rQ   r6   r¯   s     r    r(   z)getfullargspec_no_self.<locals>.<genexpr>ž  sR   è è € ð ð ØØŒF•gÔ'Ô=Ò=Ð=ØŒI˜QœWÐ$Ð$ð 	
Œ	à$Ð$Ð$Ð$ðð r   c                 óP   — g | ]#}|j         t          j        j        k    ¯|j        ‘Œ$S r   )rª   r«   r¬   ÚKEYWORD_ONLYrž   r¯   s     r    rF   z*getfullargspec_no_self.<locals>.<listcomp>£  s7   € ð ð ð ØØŒ6•WÔ&Ô3Ò3Ð3ð 	
ŒØ3Ð3Ð3r   c                 óx   — i | ]7}|j         t          j        j        k    r|j        |j        u¯*|j        |j        “Œ8S r   )rª   r«   r¬   r·   rQ   r6   rž   r¯   s     r    ú
<dictcomp>z*getfullargspec_no_self.<locals>.<dictcomp>§  sI   € ð ,ð ,ð ,¨Ø”V�wÔ0Ô=Ò=Ð=Ø”) 1¤7Ð*Ð*ð ”&˜!œ)à*Ð*Ð*r   c                 óD   — i | ]}|j         |j        u¯|j        |j         “ŒS r   )Ú
annotationr6   rž   r¯   s     r    r¹   z*getfullargspec_no_self.<locals>.<dictcomp>ª  s6   € ð 3ð 3ð 3¨AØ”l¨!¬'Ð1Ð1ð ”6˜1œ<Ø1Ð1Ð1r   )r«   Ú	signatureÚ
parametersÚvaluesrM   r¡   )	rS   Úsigr<   r¢   r£   r¤   r¥   Ú
kwdefaultsr§   s	            r    Úgetfullargspec_no_selfrÁ   y  s®  € õ* Ô
˜DÑ
!Ô
!€Cðð Øœ×-Ò-Ñ/Ô/ðñ ô €Dð
ð Øœ×-Ò-Ñ/Ô/ðñ ô €Gð $Ð-ˆg�aŒjˆj¨€Gðð Øœ×-Ò-Ñ/Ô/ðñ ô €Eð Ð'ˆE�!ŒHˆH 4€EÝð ð Øœ>×0Ò0Ñ2Ô2ðñ ô ñ ô ð ð 
ð	 ð
ð Øœ×-Ò-Ñ/Ô/ðñ ô €Jð,ð ,¨S¬^×-BÒ-BÑ-DÔ-Dð ,ñ ,ô ,€Jð3ð 3°´×1FÒ1FÑ1HÔ1Hð 3ñ 3ô 3€Kå�t˜W e¨X°zØ!Ð) T¨;ñ8ô 8ð 8r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )Ú_FunctionWrapperz?
    Object to wrap user's function, allowing picklability
    c                 ó*   — || _         |€g n|| _        d S r#   ©r8   r<   )Úselfr8   r<   s      r    Ú__init__z_FunctionWrapper.__init__´  s   € ØˆŒØ˜,�B�B¨DˆŒ	ˆ	ˆ	r   c                 ó(   —  | j         |g| j        ¢R Ž S r#   rÅ   )rÆ   Úxs     r    Ú__call__z_FunctionWrapper.__call__¸  s   € ØˆtŒv�aÐ$˜$œ)Ð$Ð$Ð$Ð$r   N)r   r   r   Ú__doc__rÇ   rÊ   r   r   r    rÃ   rÃ   °  s<   € € € € € ðð ð1ð 1ð 1ð%ð %ð %ð %ð %r   rÃ   c                   ó>   — e Zd ZdZdd„Zd„ Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
S )Ú
MapWrapperav  
    Parallelisation wrapper for working with map-like callables, such as
    `multiprocessing.Pool.map`.

    Parameters
    ----------
    pool : int or map-like callable
        If `pool` is an integer, then it specifies the number of threads to
        use for parallelization. If ``int(pool) == 1``, then no parallel
        processing is used and the map builtin is used.
        If ``pool == -1``, then the pool will utilize all available CPUs.
        If `pool` is a map-like callable that follows the same
        calling sequence as the built-in map function, then this callable is
        used for parallelization.
    r   c                 óà  — d | _         t          | _        d| _        t	          |¦  «        r|| _         | j         | _        d S ddlm} t          |¦  «        dk    r) |¦   «         | _         | j         j        | _        d| _        d S t          |¦  «        dk    rd S t          |¦  «        dk    r8 |t          |¦  «        ¬¦  «        | _         | j         j        | _        d| _        d S t          d¦  «        ‚)	NFr   )ÚPoolr[   Tr   )Ú	processeszUNumber of workers specified must be -1, an int >= 1, or an object with a 'map' method)	ÚpoolÚmapÚ_mapfuncÚ	_own_poolÚcallableÚmultiprocessingrÏ   ÚintÚRuntimeError)rÆ   rÑ   rÏ   s      r    rÇ   zMapWrapper.__init__Ì  sç   € ØˆŒ	ÝˆŒØˆŒå�D‰>Œ>ð 	-ØˆDŒIØ œIˆDŒMˆMˆMà,Ð,Ð,Ð,Ð,Ð,å�4‰yŒy˜BŠˆà ˜D™FœF�”	Ø $¤	¤�”Ø!%�”��Ý�T‘”˜a’�Ø�Ý�T‘”˜Q’�à ˜D­3¨t©9¬9Ð5Ñ5Ô5�”	Ø $¤	¤�”Ø!%�”��å"ð $,ñ -ô -ð -r   c                 ó   — | S r#   r   ©rÆ   s    r    Ú	__enter__zMapWrapper.__enter__è  s   € Øˆr   c                 óJ   — | j         r| j                             ¦   «          d S d S r#   )rÔ   rÑ   Ú	terminaterÚ   s    r    rÝ   zMapWrapper.terminateë  s0   € ØŒ>ð 	"ØŒI×ÒÑ!Ô!Ð!Ð!Ð!ð	"ð 	"r   c                 óJ   — | j         r| j                             ¦   «          d S d S r#   )rÔ   rÑ   ÚjoinrÚ   s    r    rß   zMapWrapper.joinï  s.   € ØŒ>ð 	ØŒI�NŠNÑÔÐÐÐð	ð 	r   c                 óJ   — | j         r| j                             ¦   «          d S d S r#   )rÔ   rÑ   ÚcloserÚ   s    r    rá   zMapWrapper.closeó  s.   € ØŒ>ð 	ØŒI�OŠOÑÔÐÐÐð	ð 	r   c                 ó|   — | j         r4| j                             ¦   «          | j                             ¦   «          d S d S r#   )rÔ   rÑ   rá   rÝ   )rÆ   Úexc_typeÚ	exc_valueÚ	tracebacks       r    Ú__exit__zMapWrapper.__exit__÷  sB   € ØŒ>ð 	"ØŒI�OŠOÑÔÐØŒI×ÒÑ!Ô!Ð!Ð!Ð!ð	"ð 	"r   c                 ót   — 	 |                       ||¦  «        S # t          $ r}t          d¦  «        |‚d }~ww xY w)Nz;The map-like callable must be of the form f(func, iterable))rÓ   rœ   )rÆ   rS   ÚiterableÚes       r    rÊ   zMapWrapper.__call__ü  sT   € ð	>Ø—=’=  xÑ0Ô0Ð0øÝð 	>ð 	>ð 	>åð 6ñ 7ô 7Ø<=ð>øøøøð	>øøøs   ‚ ˜
7¢2²7N©r   )r   r   r   rË   rÇ   rÛ   rÝ   rß   rá   ræ   rÊ   r   r   r    rÍ   rÍ   ¼  sŒ   € € € € € ðð ð-ð -ð -ð -ð8ð ð ð"ð "ð "ðð ð ðð ð ð"ð "ð "ð
>ð >ð >ð >ð >r   rÍ   Úint64c                 ó<  — t          | t          ¦  «        r|                      |||||¬¦  «        S | €t          j        j        j        } |r;|€|                      |dz   ||¬¦  «        S |�|                      ||dz   ||¬¦  «        S |                      ||||¬¦  «        S )al  
    Return random integers from low (inclusive) to high (exclusive), or if
    endpoint=True, low (inclusive) to high (inclusive). Replaces
    `RandomState.randint` (with endpoint=False) and
    `RandomState.random_integers` (with endpoint=True).

    Return random integers from the "discrete uniform" distribution of the
    specified dtype. If high is None (the default), then results are from
    0 to low.

    Parameters
    ----------
    gen : {None, np.random.RandomState, np.random.Generator}
        Random number generator. If None, then the np.random.RandomState
        singleton is used.
    low : int or array-like of ints
        Lowest (signed) integers to be drawn from the distribution (unless
        high=None, in which case this parameter is 0 and this value is used
        for high).
    high : int or array-like of ints
        If provided, one above the largest (signed) integer to be drawn from
        the distribution (see above for behavior if high=None). If array-like,
        must contain integer values.
    size : array-like of ints, optional
        Output shape. If the given shape is, e.g., (m, n, k), then m * n * k
        samples are drawn. Default is None, in which case a single value is
        returned.
    dtype : {str, dtype}, optional
        Desired dtype of the result. All dtypes are determined by their name,
        i.e., 'int64', 'int', etc, so byteorder is not available and a specific
        precision may have different C types depending on the platform.
        The default value is 'int64'.
    endpoint : bool, optional
        If True, sample from the interval [low, high] instead of the default
        [low, high) Defaults to False.

    Returns
    -------
    out: int or ndarray of ints
        size-shaped array of random integers from the appropriate distribution,
        or a single such random int if size not provided.
    )Úhighr   r+   ÚendpointNr   )r   r+   )rí   r   r+   )r   r   ÚintegersrH   r|   r}   r~   Úrandint)ÚgenÚlowrí   r   r+   rî   s         r    Úrng_integersró     s¾   € õX �#•yÑ!Ô!ð CØ�|Š|˜C d°¸UØ%-ð ñ /ô /ð 	/ð ˆ;å”)Ô"Ô(ˆCØð 	Oð ˆ|Ø—{’{ 3¨¡7°¸U�{ÑCÔCÐCØÐØ—{’{ 3¨T°A©X¸DÈ�{ÑNÔNÐNð �{Š{˜3 T°¸Eˆ{ÑBÔBÐBr   ì	   !E^Ã‹1ÝcuBän½ c              #   ó²   ‡K  — t           j        j        Š| fˆfd„	t           j        _        	 dV — ‰t           j        _        dS # ‰t           j        _        w xY w)z0Context with a fixed np.random.default_rng seed.c                 ó   •—  ‰| ¦  «        S r#   r   ©r„   Úorig_funs    €r    ú<lambda>z$_fixed_default_rng.<locals>.<lambda>J  s   ø€ ¨h¨h°t©n¬n€ r   N)rH   r|   Údefault_rngr÷   s    @r    Ú_fixed_default_rngrû   F  s`   øè è € õ ŒyÔ$€HØ(,Ð<Ð<Ð<Ð<Ð<…B„IÔð)Øˆˆˆà (�Œ	ÔÐÐø �Œ	ÔÐ(Ð(Ð(Ð(s   ¬A ÁAc                 óT   ‡ ‡— t          j        dt           j        ¦  «        Šˆ ˆfd„}|S )a&  Rewrite the HTML rendering of ``np.random.default_rng``.

    This is intended to decorate
    ``numpydoc.docscrape_sphinx.SphinxDocString._str_examples``.

    Examples are only run by Sphinx when there are plot involved. Even so,
    it does not change the result values getting printed.
    z*np.random.default_rng\((0x[0-9A-F]+|\d+)\)c                  ó4   •—  ‰| i |¤Ž}ˆfd„|D ¦   «         }|S )Nc                 ó<   •— g | ]}t          j        ‰d |¦  «        ‘ŒS )znp.random.default_rng())ÚreÚsub)r%   ÚlineÚpatterns     €r    rF   z7_rng_html_rewrite.<locals>._wrapped.<locals>.<listcomp>_  s8   ø€ ð 
ð 
ð 
àõ ŒF�7Ð5°tÑ<Ô<ð
ð 
ð 
r   r   )r<   ÚkwargsÚresÚlinesrS   r  s       €€r    Ú_wrappedz#_rng_html_rewrite.<locals>._wrapped]  sF   ø€ Øˆd�DÐ#˜FÐ#Ð#ˆð
ð 
ð 
ð 
àð
ñ 
ô 
ˆð ˆr   )rÿ   ÚcompileÚI)rS   r  r  s   ` @r    Ú_rng_html_rewriter	  Q  s?   øø€ õ ŒjÐFÍÌÑMÔM€Gðð ð ð ð ð ð €Or   c                 óf   — t          j        | |¬¦  «        }|r|�t          j        ||¬¦  «        }|S )z¡
    argmin with a `keepdims` parameter.

    See https://github.com/numpy/numpy/issues/8710

    If axis is not None, a.shape[axis] must be greater than 0.
    ©Úaxis)rH   ÚargminÚexpand_dims)rE   Úkeepdimsr  r  s       r    Ú_argminr  h  s>   € õ Œ)�A˜DÐ
!Ñ
!Ô
!€CØð -�DÐ$ÝŒn˜S tÐ,Ñ,Ô,ˆØ€Jr   c                 óx   — t          t          j        | ¦  «        |d¬¦  «        }t          j        | ||¬¦  «        S )aà  
    Return the first non-nan value along the given axis.

    If a slice is all nan, nan is returned for that slice.

    The shape of the return value corresponds to ``keepdims=True``.

    Examples
    --------
    >>> import numpy as np
    >>> nan = np.nan
    >>> a = np.array([[ 3.,  3., nan,  3.],
                      [ 1., nan,  2.,  4.],
                      [nan, nan,  9., -1.],
                      [nan,  5.,  4.,  3.],
                      [ 2.,  2.,  2.,  2.],
                      [nan, nan, nan, nan]])
    >>> _first_nonnan(a, axis=0)
    array([[3., 3., 2., 3.]])
    >>> _first_nonnan(a, axis=1)
    array([[ 3.],
           [ 1.],
           [ 9.],
           [ 5.],
           [ 2.],
           [nan]])
    T©r  r  r  )r  rH   ÚisnanÚtake_along_axis)rE   r  r�   s      r    Ú_first_nonnanr  v  s8   € õ8 	•”˜‘” $°Ð6Ñ6Ô6€AÝÔ˜a ¨Ð.Ñ.Ô.Ð.r   c                 ój  — |€$| j         dk    rdS |                      ¦   «         } d}nM| j        }||         dk    r:|d|…         d|z  z   ||dz   d…         z   }t          j        |dt
          ¬¦  «        S t          | |¬¦  «        }|| k    t          j        | ¦  «        z                       ||¬¦  «        S )	aé  
    Determine if the values along an axis are all the same.

    nan values are ignored.

    `a` must be a numpy array.

    `axis` is assumed to be normalized; that is, 0 <= axis < a.ndim.

    For an axis of length 0, the result is True.  That is, we adopt the
    convention that ``allsame([])`` is True. (There are no values in the
    input that are different.)

    `True` is returned for slices that are all nan--not because all the
    values are the same, but because this is equivalent to ``allsame([])``.

    Examples
    --------
    >>> from numpy import nan, array
    >>> a = array([[ 3.,  3., nan,  3.],
    ...            [ 1., nan,  2.,  4.],
    ...            [nan, nan,  9., -1.],
    ...            [nan,  5.,  4.,  3.],
    ...            [ 2.,  2.,  2.,  2.],
    ...            [nan, nan, nan, nan]])
    >>> _nan_allsame(a, axis=1, keepdims=True)
    array([[ True],
           [False],
           [False],
           [False],
           [ True],
           [ True]])
    Nr   Trê   r   r)   r  r  )	r   Úravelr5   rH   r4   Úboolr  r  rL   )rE   r  r  ÚshpÚa0s        r    Ú_nan_allsamer  –  s¼   € ðD €|ØŒ6�QŠ;ˆ;Ø�4Ø�GŠG‰IŒIˆØˆˆàŒgˆØˆtŒ9˜Š>ˆ>Ø�e�t�e”*˜t H™}Ñ,¨s°4¸!±8°9°9¬~Ñ=ˆCÝ”7˜3¨4µtÐ<Ñ<Ô<Ð<Ý	�q˜tÐ	$Ñ	$Ô	$€BØ�1ŠW�œ ™œÑ#×(Ò(¨d¸XÐ(ÑFÔFÐFr   Ú	propagate)r;   c                ó  — |€t          | ¦  «        }t          |¦  «         }|€h d£}||vr t          dt          |¦  «        › d�¦  «        ‚|                     | j        d¦  «        p|                     | j        d¦  «        }t          | ¦  «        dk    rd}n¹|r)|                     |                     | ¦  «        ¦  «        }nŽt          |¦  «        r}t          j
        | j        t          ¦  «        r^d}|                      ¦   «         D ]F}t          j
        t          |¦  «        t          j        ¦  «        rt          j        |¦  «        rd} nŒGnd}|r|d	k    rt          d
¦  «        ‚|r|r|dk    rd}t          |¦  «        ‚||fS )N>   ÚomitÚraiser  znan_policy must be one of ú.zreal floatingzcomplex floatingr   FTr  zThe input contains nan valuesr  z9`nan_policy='omit' is incompatible with non-NumPy arrays.)r	   r
   r/   ÚsetÚisdtyper+   Úxp_sizer  ÚmaxrH   rŽ   Úobjectr  ÚtypeÚnumber)	rE   Ú
nan_policyÚpoliciesr;   Ú	not_numpyr�   Úcontains_nanÚelÚmessages	            r    Ú_contains_nanr.  Æ  sŸ  € Ø	€zÝ˜QÑÔˆÝ˜R‘L”LÐ €IàÐØ1Ð1Ð1ˆØ˜Ð!Ð!ÝÐFµc¸(±m´mÐFÐFÐFÑGÔGÐGà�zŠz˜!œ' ?Ñ3Ô3ð :Ø—*’*˜QœWÐ&8Ñ9Ô9ð åˆq�z„z�Q‚€ØˆˆØ	ð à—x’x §¢ q¡	¤	Ñ*Ô*ˆˆÝ	�"‰Œð 	�"œ-¨¬µÑ8Ô8ð 	ØˆØ—'’'‘)”)ð 	ð 	ˆBåŒ}�T "™XœX¥r¤yÑ1Ô1ð µb´h¸r±l´lð Ø#�Ø�øøð ˆàð :˜
 gÒ-Ð-ÝÐ8Ñ9Ô9Ð9àð "�\ð " j°&Ò&8Ð&8ØMˆÝ˜Ñ!Ô!Ð!à˜Ð#Ð#r   c                 ó   ‡ ‡‡— ˆˆˆ fd„}|S )a¿  
    Generate decorator for backward-compatible keyword renaming.

    Apply the decorator generated by `_rename_parameter` to functions with a
    recently renamed parameter to maintain backward-compatibility.

    After decoration, the function behaves as follows:
    If only the new parameter is passed into the function, behave as usual.
    If only the old parameter is passed into the function (as a keyword), raise
    a DeprecationWarning if `dep_version` is provided, and behave as usual
    otherwise.
    If both old and new parameters are passed into the function, raise a
    DeprecationWarning if `dep_version` is provided, and raise the appropriate
    TypeError (function got multiple values for argument).

    Parameters
    ----------
    old_name : str
        Old name of parameter
    new_name : str
        New name of parameter
    dep_version : str, optional
        Version of SciPy in which old parameter was deprecated in the format
        'X.Y.Z'. If supplied, the deprecation message will indicate that
        support for the old parameter will be removed in version 'X.Y+2.Z'

    Notes
    -----
    Untested with functions that accept *args. Probably won't work as written.

    c                 óN   •‡ — t          j        ‰ ¦  «        ˆˆ ˆˆfd„¦   «         }|S )Nc            	      óŠ  •— ‰|v r·‰r}‰                      d¦  «        }t          t          |d         ¦  «        dz   ¦  «        |d<   d                     |¦  «        }d‰› d‰› d‰› d|› d�	}t	          j        |t          d¬¦  «         ‰|v r‰j        › d	‰› d
�}t          |¦  «        ‚| 	                    ‰¦  «        |‰<    ‰| i |¤ŽS )Nr   r   rm   zUse of keyword argument `z!` is deprecated and replaced by `z`.  Support for `z` will be removed in SciPy )Ú
stacklevelz2() got multiple values for argument now known as `ú`)
ÚsplitÚstrr×   rß   ÚwarningsÚwarnÚDeprecationWarningr   rœ   Úpop)r<   r  Úend_versionr-  Údep_versionÚfunÚnew_nameÚold_names       €€€€r    Úwrapperz5_rename_parameter.<locals>.decorator.<locals>.wrapper  s$  ø€ à˜6Ð!Ð!Øð MØ"-×"3Ò"3°CÑ"8Ô"8�KÝ%(­¨[¸¬^Ñ)<Ô)<¸qÑ)@Ñ%AÔ%A�K ‘NØ"%§(¢(¨;Ñ"7Ô"7�Kð :¸8ð  :ð  :Ø>Fð :ð  :à/7ð :ð  :ð ,7ð :ð  :ð  :�Gõ ”M 'Õ+=È!ÐLÑLÔLÐLØ˜vÐ%Ð%Ø"%¤,ð  Eð  EØ9Að Eð  Eð  E�Gå# GÑ,Ô,Ð,Ø#)§:¢:¨hÑ#7Ô#7��xÑ Ø�3˜Ð' Ð'Ð'Ð'r   )r_   Úwraps)r<  r?  r;  r=  r>  s   ` €€€r    Ú	decoratorz$_rename_parameter.<locals>.decorator  sH   øø€ Ý	Œ˜Ñ	Ô	ð	(ð 	(ð 	(ð 	(ð 	(ð 	(ð 	(ñ 
Ô	ð	(ð" ˆr   r   )r>  r=  r;  rA  s   ``` r    Ú_rename_parameterrB  ì  s1   øøø€ ð@ð ð ð ð ð ð ð( Ðr   c                 óf   ‡— | j         Š‰j        }ˆfd„|                     |¦  «        D ¦   «         }|S )Nc                 óz   •— g | ]7}t           j                              t          ‰¦  «        |¦  «        ¦  «        ‘Œ8S r   )rH   r|   r   r&  )r%   Úchild_ssÚbgs     €r    rF   z_rng_spawn.<locals>.<listcomp>'  sI   ø€ ð 8ð 8ð 8Øõ ”)×%Ò% h¥d¨2¡h¤h¨xÑ&8Ô&8Ñ9Ô9ð 8ð 8ð 8r   )Ú_bit_generatorÚ	_seed_seqÚspawn)ÚrngÚ
n_childrenÚssÚ
child_rngsrF  s       @r    Ú
_rng_spawnrN  #  sL   ø€ à	Ô	€BØ	Œ€Bð8ð 8ð 8ð 8Ø"$§(¢(¨:Ñ"6Ô"6ð8ñ 8ô 8€JàÐr   c                 óú   ‡ — ‰ €	t          |Ž n‰ Š ˆ fd„|D ¦   «         }	 t          ‰ d‰ j        ¦  «        } ‰ j        g |¢|‘R Ž }n# t          $ r
 ‰ j        }Y nw xY w‰                      ‰ j        |¬¦  «        d         S )Nc                 ó:   •— g | ]}‰                      |¦  «        ‘ŒS r   )r1   )r%   Úitemr;   s     €r    rF   z_get_nan.<locals>.<listcomp>/  s%   ø€ Ð.Ð.Ð. ˆB�JŠJ�tÑÔÐ.Ð.Ð.r   Úfloat16r.   r   )r	   ÚgetattrÚfloat32r3   r   r�   r1   Únan)r;   rZ   Ú	min_floatr+   s   `   r    Ú_get_nanrW  ,  sª   ø€ Ø#% :�˜$Ð	Ð	°2€Bà.Ð.Ð.Ð.¨Ð.Ñ.Ô.€DðÝ˜B 	¨2¬:Ñ6Ô6ˆ	Ø�”Ð0 Ð0 iÐ0Ð0Ð0ˆˆøÝð ð ð à”
ˆˆˆðøøøð �:Š:�b”f Eˆ:Ñ*Ô*¨2Ô.Ð.s   ž%A ÁAÁAc                 ód   — | | k     s| |k    rd| › d|› �}t          |¦  «        ‚| dk     r| |z   } | S )Nzaxis z) is out of bounds for array of dimension r   )r   )r  Úndimr—   s      r    Únormalize_axis_indexrZ  9  sM   € àˆtˆe‚|€|�t˜t’|�|ØK�dÐKÐKÀTÐKÐKˆÝ˜‰nŒnÐàˆa‚x€xØ�d‰{ˆØ€Kr   c                 óV   — | €dS 	  | |¦  «         dS # t           $ r d| _        Y dS w xY w)aY  Call wrapped callback; return True if algorithm should stop.

    Parameters
    ----------
    callback : callable or None
        A user-provided callback wrapped with `_wrap_callback`
    res : OptimizeResult
        Information about the current iterate

    Returns
    -------
    halt : bool
        True if minimization should stop

    NFT)ÚStopIterationÚstop_iteration)Úcallbackr  s     r    Ú_call_callback_maybe_haltr_  D  sP   € ð  ÐØˆuðØˆ�‰ŒˆØˆuøÝð ð ð Ø"&ˆÔØˆtˆtðøøøs   † “(§(c                   ó@   — e Zd ZdZd„ Zej        Zej        Z	d„ Z
d„ ZdS )Ú_RichResultz5 Container for multiple outputs with pretty-printing c                 óX   — 	 | |         S # t           $ r}t          |¦  «        |‚d }~ww xY wr#   )ÚKeyErrorÚAttributeError)rÆ   rž   ré   s      r    Ú__getattr__z_RichResult.__getattr__`  s@   € ð	.Ø˜”:ÐøÝð 	.ð 	.ð 	.Ý  Ñ&Ô&¨AÐ-øøøøð	.øøøs   ‚
 Š
)”$¤)c                 óÄ   ‡‡‡‡— g d¢Št          | d‰¦  «        Šh d£Šˆfd„Šˆfd„Šˆˆfd„}|                      ¦   «         rt          | |¬¦  «        S | j        j        dz   S )	N)r-  ÚsuccessÚstatusr<  ÚfunlrÉ   ÚxlÚcol_indÚnitÚlowerÚupperÚeqlinÚineqlinÚ	convergedÚflagÚfunction_callsÚ
iterationsÚrootÚ_order_keys>   ÚconÚslackrv  Úcrossover_nitc                 ó˜   •— 	 ‰                      | d                              ¦   «         ¦  «        S # t          $ r t          j        cY S w xY w©Nr   )r›   rm  r/   rH   rx   )rQ  Ú
order_keyss    €r    Úkeyz!_RichResult.__repr__.<locals>.keys  sN   ø€ ðØ!×'Ò'¨¨Q¬¯ª©¬Ñ8Ô8Ð8øÝð ð ð Ý”v���ðøøøs   ƒ,0 °A	ÁA	c              3   ó4   •K  — | D ]}|d         ‰v rŒ|V — Œd S r{  r   )ÚitemsrQ  Ú	omit_keyss     €r    Úomit_redundantz,_RichResult.__repr__.<locals>.omit_redundanty  s=   øè è € Øð ð �Ø˜”7˜iÐ'Ð'ØØ�
�
�
�
ðð r   c                 ó\   •— t           ‰|                      ¦   «         ¦  «        ‰¬¦  «        S )N)r}  )Úsortedr  )Údr}  r�  s    €€r    Úitem_sorterz)_RichResult.__repr__.<locals>.item_sorter  s(   ø€ Ý˜.˜.¨¯ª©¬Ñ3Ô3¸Ð=Ñ=Ô=Ð=r   )Úsorterz())rS  ÚkeysÚ_dict_formatterÚ	__class__r   )rÆ   r…  r}  r€  r�  r|  s     @@@@r    Ú__repr__z_RichResult.__repr__i  s½   øøøø€ ðð ð ˆ
õ ˜T =°*Ñ=Ô=ˆ
ð EÐDÐDˆ	ð	ð 	ð 	ð 	ð 	ð	ð 	ð 	ð 	ð 	ð	>ð 	>ð 	>ð 	>ð 	>ð 	>ð �9Š9‰;Œ;ð 	2Ý" 4°Ð<Ñ<Ô<Ð<à”>Ô*¨TÑ1Ð1r   c                 óD   — t          |                      ¦   «         ¦  «        S r#   )Úlistr‡  rÚ   s    r    Ú__dir__z_RichResult.__dir__‡  s   € Ý�D—I’I‘K”KÑ Ô Ð r   N)r   r   r   rË   re  ÚdictÚ__setitem__Ú__setattr__Ú__delitem__Ú__delattr__rŠ  r�  r   r   r    ra  ra  ^  sY   € € € € € Ø?Ð?ð.ð .ð .ð Ô"€KØÔ"€Kð2ð 2ð 2ð<!ð !ð !ð !ð !r   ra  c                 óf   — |                       d¦  «        }d|z  }d|z                        |¦  «        S )zQ
    Ensures that lines after the first are indented by the specified amount
    ú
ú )r4  rß   )Úsrq   r4  Úindents       r    Ú	_indenterr˜  ‹  s4   € ð �GŠG�D‰MŒM€EØ�‰U€FØ�6‰M×Ò Ñ&Ô&Ð&r   c                 ó¶   — t          j        | ¦  «        rdS t          j        | ¦  «        rdS t          j        | ¦  «        rdS t          j        | ddd¬¦  «        S )zP
    Returns a string representation of a float with exactly ten characters
    z
       infz
      -infz
       nané   rm   F)Ú	precisionÚpad_leftÚunique)rH   ÚisposinfÚisneginfr  Úformat_float_scientific)rÉ   s    r    Ú_float_formatter_10r¡  ”  s]   € õ 
„{�1�~„~ð Øˆ|Ý	Œ�Q‰Œð Øˆ|Ý	Œ�!‰Œð Øˆ|ÝÔ% a°1¸qÈÐOÑOÔOÐOr   c           	      óª  ‡‡‡— t          | t          ¦  «        rqt          t          t          t          |                      ¦   «         ¦  «        ¦  «        ¦  «        |z   Šd                     ˆˆˆfd„ ‰| ¦  «        D ¦   «         ¦  «        }nIt          j	        d‰z
  dddt          i¬¦  «        5  t          | ¦  «        }ddd¦  «         n# 1 swxY w Y   |S )	zÊ
    Pretty printer for dictionaries

    `n` keeps track of the starting indentation;
    lines are indented by this much after a line break.
    `mplus` is additional left padding applied to keys
    r”  c                 óš   •— g | ]G\  }}|                      ‰¦  «        d z   t          t          |‰‰z   dz   d‰¦  «        ‰dz   ¦  «        z   ‘ŒHS )z: rm   r   )Úrjustr˜  rˆ  )r%   r�   ÚvÚmrq   r†  s      €€€r    rF   z#_dict_formatter.<locals>.<listcomp>«  si   ø€ ð .ð .ð .á˜1˜að —w’w˜q‘z”z DÑ(Ý ¥°°A°a±C¸±E¸1¸fÑ!EÔ!EÀqÈÁsÑKÔKñLð .ð .ð .r   éL   rm   é   Ú
float_kind)Ú	linewidthÚ	edgeitemsÚ	thresholdÚ	formatterN)r   rŽ  r$  rÒ   ÚlenrŒ  r‡  rß   rH   Úprintoptionsr¡  r5  )r„  rq   Úmplusr†  r–  r¦  s    ` ` @r    rˆ  rˆ  ¡  s&  øøø€ õ �!•TÑÔð Ý••C�˜aŸfšf™hœh™œÑ(Ô(Ñ)Ô)¨EÑ1ˆØ�IŠIð .ð .ð .ð .ð .ð .à#) 6¨!¡9¤9ð.ñ .ô .ñ /ô /ˆˆõ Œ_ r¨!¡t°qÀBØ(4Õ6IÐ'JðLñ Lô Lð 	ð 	å�A‘”ˆAð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð €Hs   Â,CÃCÃC)NN)r   )TFFFFr#   )NNrë   F)rô   )FN)F)r  N)r   r   N)\rÿ   Ú
contextlibr   r_   ra   r6  r€   Úcollectionsr   r«   rv   Útypingr   r   r   r   ÚnumpyrH   Úscipy._lib._array_apir	   r
   r   r#  r&  Ú	ExceptionÚ__annotations__ÚWarningÚlibÚNumpyVersionÚ__version__Únumpy.exceptionsr   r   r   r   rœ   Úcatch_warningsÚfilterwarningsÚFutureWarningÚlongr   Úulongr   rd  Úint_Úuintr×   r‚   Ú	IntNumberru   ÚfloatingÚDecimalNumberr  r   ro   Ú	__array__r|   r   rƒ   ÚSeedTyper   Únumpy.randomÚImportErrorrA   rV   rk   rp   ry   r…   r™   r    r¡   rÁ   rÃ   rÍ   ró   rû   r	  r  r  r  r.  rB  rN  rW  rZ  r_  rŽ  ra  r˜  r¡  rˆ  r   r   r    ú<module>rË     s  ðØ 	€	€	€	€	Ø %Ð %Ð %Ð %Ð %Ð %Ø Ð Ð Ð Ø €€€Ø €€€Ø €€€Ø "Ð "Ð "Ð "Ð "Ð "Ø €€€Ø €€€ðð ð ð ð ð ð ð ð ð ð ð ð Ð Ð Ð Ø LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ LÐ Lð �	Œ?Ð Ð Ñ Ø�W”Ð Ð Ñ Ø œ=Ð (Ð (Ñ (à„6×Ò�r”~Ñ&Ô&¨(Ò2Ð2ðð ð ð ð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð ð ð $Ðà	€€�Ø
€€�à„6×Ò�r”~Ñ&Ô&¨,Ò6Ð6ðØ$ˆXÔ$Ñ&Ô&ð 	 ð 	 Ø#ˆHÔ#ØØBØñô ð ð
 ”gˆGØ”xˆHð	 ð 	 ð 	 ñ 	 ô 	 ð 	 ð 	 ð 	 ð 	 ð 	 ð 	 øøøð 	 ð 	 ð 	 ð 	 øøð ð ð ð Ø”gˆGØ”wˆHˆHˆHðøøøð Œg€GØŒw€Hà�#�r”z�/Ô"€	Ø�e˜Rœ[¨"¬*Ð4Ô5€à˜”Ð Ð Ñ à„6×Ò�r”~Ñ&Ô&¨'Ò1Ð1Ø€N€NØ„V×Ò˜œÑ(Ô(¨8Ò3Ð3Ø€N€NðØˆŒ�!�‰Œ×Ò TÐÑ*Ô*Ð*ØˆˆøØð ð ð Øˆˆˆðøøøð
 ð QØ˜˜i¨¬Ô)<Ø œiÔ3ð4ô 5ô 6€Hà�G˜O°5¸¼Ô9LØ9;¼Ô9Nð:Oô 4Pð Qñ Qô Q€MðØ3Ð3Ð3Ð3Ð3Ð3Ð3øØð ð ð ðð ð ð ð ñ ô ð ð ð ðøøøð
Dð Dð Dð DðN%ð %ð %ð %ðP !&¨S¸ð ð ð ð ð4ð ð ð;�sð ;˜uð ;ð ;ð ;ð ;ð"ð "ð "ð< (,ØBGØ"'ð5ð 5ð 5ð 5ðpð ð ð ðR ˆj˜ðIð Ið IñJô J€ð
48ð 48ð 48ðn	%ð 	%ð 	%ð 	%ð 	%ñ 	%ô 	%ð 	%ðG>ð G>ð G>ð G>ð G>ñ G>ô G>ð G>ðT 8?Øð=Cð =Cð =Cð =Cð@ ð)ð )ð )ñ „ð)ðð ð ð.ð ð ð ð/ð /ð /ð@-Gð -Gð -Gð -Gð`#$À$ð #$ð #$ð #$ð #$ð #$ðL4ð 4ð 4ð 4ðnð ð ð ð 
/ð 
/ð 
/ð 
/ð 
/ðð ð ðð ð ð4*!ð *!ð *!ð *!ð *!�$ñ *!ô *!ð *!ðZ'ð 'ð 'ð 'ð
Pð 
Pð 
Pðð ð ð ð ð sZ   ÃD Ã!DÃ?D ÄDÄD ÄDÄD ÄD-Ä,D-Æ:'G" Ç"G,Ç+G,É I ÉIÉI