+
    –°³j  ã                  ó   € R t ^ RIHt ^ RIt^ RIHt ^ RIt^RIHtH	t	 ^RI
HtHtHt . ROtR tR t]RR l4       t]RR	 l4       tR
 t]t]t]RR l4       t]R 4       t]RR l4       t]R 4       t]RR l4       t]]RR R ll4       4       tR# )z§Wrapper to mimic (parts of) np.random API surface.

NumPy has strict guarantees on reproducibility etc; here we don't give any.

Q: default dtype is float64 in numpy

)ÚannotationsN)Úsqrt)Ú_dtypes_implÚ_util)Úarray_or_scalarÚ	ArrayLikeÚ
normalizerc                 ó,   € ^ RI Hu Hp  V P                  # )é    N)Útorch._dynamo.configÚ_dynamoÚconfigÚuse_numpy_random_stream)r   s    ÚT/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/_numpy/random.pyÚuse_numpy_randomr   %   s   € ç)Ð)à×)Ñ)Ð)ó    c                óF   a € \         P                  ! S 4      V 3R  l4       pV# )c            	     ó  <a€ \        4       '       g	   S! V / VB # ^ RIp^RIHo \	        VP
                  SP                  4      p\        ;QJ d    . V3R lV  4       F  NK  	  5M! V3R lV  4       4      p VP                  4        UUu/ uF4  w  rET\        VS4      '       d   VP                  P                  4       MTbK6  	  pppV! V / VB p\        WbP                  4      '       d   S! \        P                  ! V4      4      pV# u uppi )r
   N©Úndarrayc              3  ó€   <"  € T F3  p\        VS4      '       d   VP                  P                  4       MTx € K5  	  R # 5i©N)Ú
isinstanceÚtensorÚnumpy)Ú.0Úargr   s   & €r   Ú	<genexpr>Ú-deco_stream.<locals>.inner.<locals>.<genexpr>9   s3   øé € ð ÙSWÈC¤j°°g×&>Ò&>�—
‘
× Ñ Ô"ÀCÔGÓSWùs   ƒ;>)r   r   Ú_ndarrayr   ÚgetattrÚrandomÚ__name__ÚtupleÚitemsr   r   ÚtorchÚ	as_tensor)	ÚargsÚkwdsr   ÚfÚkeyÚvalÚvaluer   Úfuncs	   *,     @€r   ÚinnerÚdeco_stream.<locals>.inner-   së   ù€ ä×!Ò!Ù˜Ð& Ñ&Ð&ãå)ä˜Ÿ™ d§m¡mÓ4ˆA÷ ”5ô ÙSWó—5‘5ô ÙSWóó ˆDð
 !%§
¡
¤ôá ,‘H�Cð ¬:°c¸7×+CÒ+C�S—Z‘Z×%Ñ%Ô'ÈÒLÙ ,ð ñ ñ
 �tÐ$˜tÑ$ˆEô ˜%§¡×/Ò/Ù¤§¢°Ó 6Ó7�àˆLùós   Â
:D)Ú	functoolsÚwraps)r-   r.   s   f r   Údeco_streamr2   ,   s%   ø€ Ü‡_‚_�TÓôó ðð6 €Lr   c                óP   € V e"   \         P                  P                  V 4       R # R # r   )r%   r!   Úmanual_seed)Úseeds   &r   r5   r5   L   s   € àÒÜ�‰× Ñ  Ö&ñ r   c                ó´   € V f   Rp \         P                  ! 4       P                  p\        P                  ! WR7      P                  4       p\        W R8H  R7      # ©N©Údtype©Úreturn_scalar© ©r   Údefault_dtypesÚfloat_dtyper%   ÚemptyÚuniform_r   ©Úsizer9   Úvaluess   &  r   Úrandom_samplerE   R   sF   € à‚|ØˆÜ×'Ò'Ó)×5Ñ5€EÜ�[Š[˜Ô+×4Ñ4Ó6€FÜ˜6¸±Ô<Ð<r   c                 ó*   € V R8X  d   R p \        V 4      # )Nr<   )rE   ©rC   s   *r   ÚrandrH   [   s   € Øˆr„zØˆÜ˜ÓÐr   c                ó¶   € Vf   Rp\         P                  ! 4       P                  p\        P                  ! W#R7      P                  W4      p\        WBR8H  R7      # r7   r=   )ÚlowÚhighrC   r9   rD   s   &&&  r   ÚuniformrL   e   sH   € à‚|ØˆÜ×'Ò'Ó)×5Ñ5€EÜ�[Š[˜Ô+×4Ñ4°SÓ?€FÜ˜6¸±Ô<Ð<r   c                 óŒ   € \         P                  ! 4       P                  p\        P                  ! WR 7      p\        W R8H  R7      # )r8   r:   r<   )r   r>   r?   r%   Úrandnr   rB   s   *  r   rN   rN   n   s3   € ä×'Ò'Ó)×5Ñ5€EÜ�[Š[˜Ô+€FÜ˜6¸±Ô<Ð<r   c                ó¶   € Vf   Rp\         P                  ! 4       P                  p\        P                  ! W#R7      P                  W4      p\        WBR8H  R7      # r7   )r   r>   r?   r%   r@   Únormal_r   )ÚlocÚscalerC   r9   rD   s   &&&  r   ÚnormalrS   u   sH   € à‚|ØˆÜ×'Ò'Ó)×5Ñ5€EÜ�[Š[˜Ô+×3Ñ3°CÓ?€FÜ˜6¸±Ô<Ð<r   c                ó*  € ^RI Hp \        V \        P                  4      '       d   T pM)\        W4      '       d   V P
                  pM\        R4      h\        P                  ! VP                  ^ ,          4      pW#,          pVP                  V4       R# )é   r   z'We do not random.shuffle lists in-placeN)
r   r   r   r%   ÚTensorr   ÚNotImplementedErrorÚrandpermÚshapeÚcopy_)Úxr   r   ÚpermÚxps   &    r   Úshuffler^   ~   sf   € õ "ä�!”U—\‘\×"Ò"Ø‰Ü	�A×	Ò	Ø—‘‰ä!Ð"KÓLÐLä�>Š>˜&Ÿ,™, q�/Ó*€DØ	�€BØ
‡L�L�Ör   c                ó´   € Vf   Rp\        V\        \        34      '       g   V3pVf   ^ T r\        P                  ! WVR7      p\        V\        VR8H  R7      # )NrG   r:   r<   )r   r#   Úlistr%   Úrandintr   Úint)rJ   rK   rC   rD   s   &&& r   ra   ra   �   sS   € à‚|ØˆÜ�dœU¤D˜M×*Ò*ØˆwˆØ‚|Ø�sˆTÜ�]Š]˜3¨4Ô0€FÜ˜6¤3°d¸b±jÔAÐAr   c               ó    € V ^8„  d   QhRRRR/# )é   Úar   ÚpzArrayLike | Noner<   )Úformats   "r   Ú__annotate__rh   �   s   € ÷ "ñ "ˆið "Ð5Eñ "r   c                ó’  € V P                  4       ^8X  d   \        P                  ! V 4      p Vf   ^pM2\        P                  ! V4      '       d   ^pV F  pWE,          pK  	  MTpVf/   \        P
                  ! V 4      V P                  ^ ,          ,          p\        \        P                  ! VP                  4      P                  4      p\        VP                  4       R,
          4      V8”  d   \        R4      h\        P                  ! W4VR7      p\        P                  ! V4      '       d   VP                  V4      pW,          pV# )rU   ç      ð?zprobabilities do not sum to 1.)Úreplacement)Únumelr%   Úaranger   Úis_sequenceÚ	ones_likerY   r   Úfinfor9   ÚepsÚabsÚsumÚ
ValueErrorÚmultinomialÚreshape)	re   rC   Úreplacerf   Únum_elÚelÚatolÚindicesÚsampless	   &&&&     r   Úchoicer}   ›   sû   € ð 	‡w�wƒy�A„~Ü�LŠL˜‹Oˆð
 ‚|Ø‰Ü	×	Ò	˜4×	 Ò	 ØˆÛˆBØ�LŠFò ð ˆð 	‚yÜ�OŠO˜AÓ §¡¨¥Õ+ˆô ”—’˜AŸG™GÓ$×(Ñ(Ó)€DÜ
ˆ1�5‰5‹7�S�=Ó˜DÔ ÜÐ9Ó:Ð:ô ×Ò °wÔ?€Gä×Ò˜×ÒØ—/‘/ $Ó'ˆà�j€Gà€Nr   )r5   rE   Úsampler!   rH   rN   rS   r}   ra   r^   rL   r   )g        rj   N)NN)NTN)Ú__doc__Ú
__future__r   r0   Úmathr   r%   Ú r   r   Ú_normalizationsr   r   r   Ú__all__r   r2   r5   rE   rH   r~   r!   rL   rN   rS   r^   ra   r}   r<   r   r   Ú<module>r…      sî   ðñõ #ã Ý ã ç !ß CÑ Cò€ò*òð@ ó'ó ð'ð
 ó=ó ð=òð 
€Ø	€ð ó=ó ð=ð ñ=ó ð=ð ó=ó ð=ð ñó ðð  óBó ðBð Øö"ó ó ò"r   