
    eCi\                     $    S r SSKrSSKrS rS rg)zEAlgorithms to support fitting routines in seaborn plotting functions.    Nc            
         [        [        R                  " [        [	        [         U 5      5      5      5      S:  a  [        S5      e[        U S   5      nUR                  SS5      nUR                  SS5      nUR                  SS	5      nUR                  S
S	5      nUR                  SS	5      nUb  Sn[        R                  " U5        UR                  SU5      n	Uc  [        5       n
O	[        US9n
[        U	[        R                  R                  5      (       a  U	nO[        R                  R                  U	5      n[        [	        [        R                  U 5      5      n Ub  [        R                  " U5      n[        U[        5      (       a  [!        [        U5      n[        R"                  " [        R$                  " [        R&                  " U 5      5      5      nU(       aQ  UR)                  S5      (       d;  [!        [        SU 3S	5      nUc"  SU S3n[        R                  " U[*        5        OUnOUn UR,                  nUb  [3        XXlX5      $ / n[5        [7        U5      5       HP  nU" SX"[        R8                  S9nU  Vs/ s H  nUR;                  USS9PM     nnUR=                  U" U0 U
D65        MR     [        R>                  " U5      $ ! [.         a    UR0                  n Nf = fs  snf )a  Resample one or more arrays with replacement and store aggregate values.

Positional arguments are a sequence of arrays to bootstrap along the first
axis and pass to a summary function.

Keyword arguments:
    n_boot : int, default=10000
        Number of iterations
    axis : int, default=None
        Will pass axis to ``func`` as a keyword argument.
    units : array, default=None
        Array of sampling unit IDs. When used the bootstrap resamples units
        and then observations within units instead of individual
        datapoints.
    func : string or callable, default="mean"
        Function to call on the args that are passed in. If string, uses as
        name of function in the numpy namespace. If nans are present in the
        data, will try to use nan-aware version of named function.
    seed : Generator | SeedSequence | RandomState | int | None
        Seed for the random number generator; useful if you want
        reproducible resamples.

Returns
-------
boot_dist: array
    array of bootstrapped statistic values

   z*All input arrays must have the same lengthr   n_booti'  funcmeanaxisNunitsrandom_seedz<`random_seed` has been renamed to `seed` and will be removedseedr   nanz/Data contain nans but no nan-aware version of `z` founddtype) lennpuniquelistmap
ValueErrorgetwarningswarndict
isinstancerandomRandomStatedefault_rngasarraystrgetattrisnansumcolumn_stack
startswithUserWarningintegersAttributeErrorrandint_structured_bootstraprangeintintptakeappendarray)argskwargsnr   r   r   r	   r
   msgr   func_kwargsrngfmissing_datananfr&   	boot_disti	resamplerasamples                        L/home/james-whalen/.local/lib/python3.13/site-packages/seaborn/algorithms.py	bootstrapr?      sw   < 299T#c4.)*+a/EFFDGA ZZ%(F::ff%D::fd#DJJw%E**]D1KLc::fk*D|fo $		--..ii##D) BJJ%&D

5!$ B xxrt'< => 6 62TF|T2D|GvWUc;/ <<
 $T5%0< 	< I3v;QBGG4	59:T!&&&+T:F2k23   88I  ;; ;s   8K K0K-,K-c                 ,   [         R                  " U5      n[        U5      nU  VV	s/ s H  o V	s/ s H	  oX):H     PM     sn	PM     n nn	/ n
[        [	        U5      5       H  nU" SXw[         R
                  S9nU  VVs/ s H  o Vs/ s H  oU   PM	     snPM     nnn[        [        US   5      nU Vs/ s H  o" SX[         R
                  S9PM     nnU VVVs/ s H2  n[        X5       VVs/ s H  u  nnUR                  USS9PM     snnPM4     nnnn[        [        [         R                  U5      5      nU
R                  U" U0 UD65        M     [         R                  " U
5      $ s  sn	f s  sn	nf s  snf s  snnf s  snf s  snnf s  snnnf )z%Resample units instead of datapoints.r   r   r   )r   r   r   r*   r+   r,   r   zipr-   r   concatenater.   r/   )r0   r   r	   r   r4   r&   unique_unitsn_unitsr<   unitr9   r:   r;   r=   lengthsr2   crs                     r>   r)   r)   h   sT   99U#L,GAEFA,7,$u},7DFI3v;Q@	59:T+AQ4+T:c6!9%?FGw!XaRWW5w	GMSTVQ1BC1BA166!!6$1BCVTc"..&12v556   88I 8F
 ,:GCTsL   	E3E. E3>	E>E9E>6FF
1F	F
.E39E>	F
)__doc__numpyr   r   r?   r)        r>   <module>rM      s    K  _DrL   