ó
    Mpˆj
  ã                   ó&   • S r SSKJr  SSKJr  S rg)z8Utility function to get the number of bootstrap samples.é    )ÚIntegral)Úwarnc           	      ó  • Uc  U $ [        U[        5      (       a  U$ Uc	  U nSU S3nOUR                  5       nSU S3n[        [	        X-  5      S5      nU[        SU S-  5      :  a  [        SU< SU S	U S
35        U$ )a6  
Get the number of samples in a bootstrap sample.

Notes
-----
The frequency semantics of :term:`sample_weight` is guaranteed when
`max_samples` is a float or integer, but not when `max_samples` is None. The
returned `n_samples_bootstrap` will be the same between a weighted dataset
with integer `sample_weights` and a dataset with as many rows repeated when
`max_samples` is a float or integer. They will differ when `max_samples` is
None (the weighted and repeated datasets do not have the same number of rows).

Parameters
----------
n_samples : int
    Number of samples in the dataset.

max_samples : None, int or float
    The maximum number of samples to draw.

    - If None, then draw `n_samples` samples.
    - If int, then draw `max_samples` samples.
    - If float, then draw `max_samples * n_samples` unweighted samples or
      `max_samples * sample_weight.sum()` weighted samples.

sample_weight : array of shape (n_samples,) or None
    Sample weights.

Returns
-------
n_samples_bootstrap : int
    The total number of samples to draw for the bootstrap sample.
zthe number of samples is Ú z#the total sum of sample weights is é   é
   gUUUUUUÕ?z'Using the fractional value max_samples=z when zresults in a low number (zQ) of bootstrap samples. We recommend passing `max_samples` as an integer instead.)Ú
isinstancer   ÚsumÚmaxÚintr   )Ú	n_samplesÚmax_samplesÚsample_weightÚweighted_n_samplesÚweighted_n_samples_msgÚn_samples_bootstraps         ÚW/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/sklearn/ensemble/_bootstrap.pyÚ_get_n_samples_bootstrapr   
   sÅ   € ðD ÑØÐÜ	K¤×	*Ñ	*ØÐàÑØ&ÐØ#<Ð=OÐ<PÐPQÐ!RÑà*×.Ñ.Ó0Ðà1Ð2DÐ1EÀQÐGð 	ô
 œc +Ñ"BÓCÀQÓGÐð œS  Y°5Ñ%9Ó:Ó:ÜØ6¨+©°vÐ>TÐ=UØ'Ð(;Ð'<ð =HðHô	
ð
 Ðó    N)Ú__doc__Únumbersr   Úwarningsr   r   © r   r   Ú<module>r      s   ðÙ >õ
 Ý ó;r   