+
    QV-jõ  ã                   ó   € ^ RI tR tRR ltR# )é    Nc                óJ  € W,          V P                  4       ,          p\        P                  ! V4      p\        WP                  4       ,
          4      pV^ 8”  d­   W4,
          p\        P                  ! \        P
                  ! V4      4      RRR1,          pV Fj  p\        P                  ! Wh8H  4      w  p	\        \        V	4      V4      p
VP                  WšRR7      p	WI;;,          ^,          uu&   WZ,          pV^ 8X  g   Kj   M	  VP                  \        P                  4      # )a€  Computes approximate mode of multivariate hypergeometric.
This is an approximation to the mode of the multivariate
hypergeometric given by class_counts and n_draws.
It shouldn't be off by more than one.
It is the mostly likely outcome of drawing n_draws many
samples from the population given by class_counts.
Args
----------
class_counts : ndarray of int
    Population per class.
n_draws : int
    Number of draws (samples to draw) from the overall population.
rng : random state
    Used to break ties.
Returns
-------
sampled_classes : ndarray of int
    Number of samples drawn from each class.
    np.sum(sampled_classes) == n_draws

NF)ÚsizeÚreplaceéÿÿÿÿ)ÚsumÚnpÚfloorÚintÚsortÚuniqueÚwhereÚminÚlenÚchoiceÚastypeÚint64)Úclass_countsÚn_drawsÚrngÚ
continuousÚflooredÚneed_to_addÚ	remainderÚvaluesÚvalueÚindsÚadd_nows   &&&        Úh/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/datasets/utils/stratify.pyÚapproximate_moder      sã   € ð0 Õ'¨,×*:Ñ*:Ó*<Õ<€Jä�hŠh�zÓ"€Gô �g§¡£Õ-Ó.€KØ�Q„ØÕ(ˆ	Ü—’œŸš 9Ó-Ó.©t°¨tÕ4ˆó ˆEÜ—h’h˜yÑ1Ó2‰GˆTô
 œ#˜d›) [Ó1ˆGØ—:‘:˜d¸%�:Ó@ˆDØ�M˜QÕ‹MØÕ"ˆKØ˜aÖÙñ ð �>‰>œ"Ÿ(™(Ó#Ð#ó    c           	   #  ó¤  "  € \         P                  ! V RR7      w  rVVP                  ^ ,          p\         P                  ! V4      p\         P                  ! V4      ^8  d   \        R4      hW8  d   \        RW3,          4      hW'8  d   \        RW'3,          4      h\         P                  ! \         P                  ! VRR7      \         P                  ! V4      RR 4      p	\        V4       FÝ  p
\        W�V4      pW‹,
          p\        WÂV4      p. p. p\        V4       F€  pVP                  VV,          4      pV	V,          P                  VR	R
7      pVP                  VRVV,           4       VP                  VVV,          VV,          VV,          ,            4       K‚  	  VP                  V4      pVP                  V4      pWï3x € Kß  	  R# 5i)aP  

Provides train/test indices to split data in train/test sets.
It's reference is taken from StratifiedShuffleSplit implementation
of scikit-learn library.

Args
----------

n_train : int,
    represents the absolute number of train samples.

n_test : int,
    represents the absolute number of test samples.

random_state : int or RandomState instance, default=None
    Controls the randomness of the training and testing indices produced.
    Pass an int for reproducible output across multiple function calls.

n_splits : int, default=10
    Number of re-shuffling & splitting iterations.
T)Úreturn_inversezMinimum class count errorzLThe train_size = %d should be greater or equal to the number of classes = %dzKThe test_size = %d should be greater or equal to the number of classes = %dÚ	mergesort)ÚkindNÚclip)Úmoder   )r   r   ÚshapeÚbincountr   Ú
ValueErrorÚsplitÚargsortÚcumsumÚranger   ÚpermutationÚtakeÚextend)ÚyÚn_trainÚn_testr   Ún_splitsÚclassesÚ	y_indicesÚ	n_classesr   Úclass_indicesÚ_Ún_iÚclass_counts_remainingÚt_iÚtrainÚtestÚir.   Úperm_indices_class_is   &&&&&              r   Ú)stratified_shuffle_split_generate_indicesrA   6   s›  é € ô. Ÿš 1°TÔ:Ñ€GØ—‘˜aÕ €IÜ—;’;˜yÓ)€LÜ	‡v‚vˆlÓ˜aÔÜÐ4Ó5Ð5ØÔÜØZÐ^eÐ]qÕqó
ð 	
ð ÔÜØYÐ]cÐ\oÕoó
ð 	
ô —H’HœRŸZšZ¨	¸ÔDÄbÇiÂiÐP\ÓF]Ð^aÐ_aÐFbÓc€MÜ�8Ž_ˆÜ˜|°cÓ:ˆØ!-Õ!3ÐÜÐ5¸sÓCˆàˆØˆä�yÖ!ˆAØŸ/™/¨,°q­/Ó:ˆKØ#0°Õ#3×#8Ñ#8¸È6Ð#8Ó#RÐ Ø�L‰LÐ-¨h°°AµÐ7Ô8Ø�K‰KÐ,¨S°­V°c¸!µf¸sÀ1½vµoÐFÖGñ	 "ð
 —‘ Ó&ˆØ�‰˜tÓ$ˆàˆkÔó! ùs   ‚GG)é
   )Únumpyr   r   rA   © r    r   Ú<module>rE      s   ðÛ ò/$öd5r    