
    J/Ph                     n   d Z ddlZddlmZ ddlmZmZ ddlm	Z	m
Z
 ddlmZmZ ddlmZ ddlmZ dd	lmZmZ dd
lmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 ddl7m8Z8 dVdZ9d Z:d Z; eej<        d          dej=        dfd            Z> eej<        d          dWd            Z? eej<        d          dWd            Z@ eej<        d          dejA        fd            ZB eej<        d          dejA        dfd            ZC eej<        d          dejA        fd            ZD eej<        d          dejA        fd            ZE eej<        d           	 	 dXd#            ZF eej<        d$          	 	 dXd%            ZG eej<        d&          dYd'            ZH eej<        d(          dYd)            ZI eej<        d*          dZd+            ZJ eej<        d,          dZd-            ZK eej<        d.          dZd/            ZL eej<        d0          dZd1            ZM eej<        d2          dZd3            ZN eej<        d4          dZd5            ZO eej<        d6          dZd7            ZP eej<        d8          dXd9            ZQ eej<        d:          dXd;            ZR eej<        d<          dXd=            ZS eej<        d>          dYd?            ZT eej<        d@          dZdA            ZU eej<        dB          dZdC            ZV eej<        dD          dZdE            ZW eej<        dF          dZdG            ZX eej<        dH          dZdI            ZY eej<        dJ          dZdK            ZZ eej<        dL          dZdM            Z[ eej<        dN          dZdO            Z\ eej<        dP          dZdQ            Z] eej<        dR          dZdS            Z^ eej<        dT          dZdU            Z_dS )[z;
Implementation of method overloads for Generator objects.
    N)types)overload_methodregister_jitable)as_dtype
from_dtype)
next_floatnext_double)is_nonelike)TypingError)TupleUniTuple)"!random_standard_exponential_inv_frandom_standard_exponential_invrandom_standard_exponentialrandom_standard_normal_frandom_standard_gammarandom_standard_normalrandom_uniformrandom_standard_exponential_frandom_standard_gamma_frandom_normalrandom_exponentialrandom_gammarandom_betarandom_powerrandom_frandom_chisquarerandom_standard_cauchyrandom_paretorandom_weibullrandom_laplacerandom_logisticrandom_lognormalrandom_rayleighrandom_standard_trandom_waldrandom_geometricrandom_zipfrandom_triangularrandom_poissonrandom_negative_binomialrandom_logseriesrandom_noncentral_chisquarerandom_noncentral_frandom_binomial)random_methods	the givenc                    t          |t          j                  r|j        }|}t          |t                    r"t          t          j        |                    }n+t          |t          j                  r|}t          |          }|t          j
        t          j        fvrt          d          |t          j
        k    r| }n|}||fS )a  
        Most of the standard NumPy distributions that accept dtype argument
        only support either np.float32 or np.float64 as dtypes.

        This is a helper function that helps Numba select the proper underlying
        implementation according to provided dtype.
    zLArgument dtype is not one of the expected type(s):  np.float32 or np.float64)
isinstancer   Omittedvaluetyper   npdtypeNumberClassr   float32float64r   )func_32func_64r8   	dist_namenp_dtnb_dt	next_funcs          a/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/np/random/generator_methods.py_get_proper_funcrC      s     %'' E%  28E??++	E5,	-	-  RZ,,, 6 7 7 	7 
			e    c                    t          t          | t                    ot          | j        t          j                  t          | t                    o
| j        dk    t          | t          j                  g          st          d          d S )Nr   zdArgument size is not one of the expected type(s):  an integer, an empty tuple or a tuple of integers)	anyr3   r   r8   r   Integerr   countr   )sizes    rB   
check_sizerJ   ;   s    
4** 64:u}554'';DJ!O4//1 2 2 P  O P P 	P	P PrD   c                      t           t          j                  r j         t          |t          t
          f          s|g}t           fd|D                       st          d| dd| z             dS )z\
    Check if given object is one of the provided types.
    If not raises an TypeError
    c                 0    g | ]}t          |          S  )r3   ).0_typeobjs     rB   
<listcomp>zcheck_types.<locals>.<listcomp>P   s#    >>>5
3&&>>>rD   z	Argument z is not one of thez expected type(s): N)r3   r   r4   r5   listtuplerF   r   )rP   	type_listarg_names   `  rB   check_typesrV   E   s    
 #u}%% ii$//  K	>>>>I>>>?? =BhBBB;	;;< = = 	== =rD   integersFc                   
 t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j        t          gd           t          |t          j                  r|j        }t          |t          j                  r|j        }t          |t                    r$t          t          j        |                    }|}n;t          |t          j                  r|}t          |          }nt          d          |t          j        k    rt"          j        
ddn_	 t          j        |          }n# t(          $ r t          d          w xY wt+          t"          d|j         d          
|j        |j        t3          |          rd t          j        d	f
fd
	}	|	S t7          |           d t          j        d	f
fd	}	|	S )NlowhighendpointzArgument dtype is not one of the expected type(s): np.int32, np.int64, np.int16, np.int8, np.uint32, np.uint64, np.uint16, np.uint8, np.bool_   random_bounded_uint_fillFc                 (   t          j        |||	           |sC| |d          z  } ||          } ||          }||z
  } | j        ||d|          d         S  ||          } ||          }||z
  } | j        ||d|          d         S )N   r   r0   _randint_arg_checkbit_generator
instrY   rZ   rI   r8   r[   rngint_funclower_boundupper_bounds
          rB   implz/NumPyRandomGeneratorType_integers.<locals>.impl   s    -c4.9;H H H 
Ka eCjjuT{{Sjx 2CaGGJJeCjjuT{{Sjx 2CaGGJJrD   c                    t          j        |||	           |s=| |d          z  } ||          } ||          }||z
  } | j        ||||          S  ||          } ||          }||z
  } | j        ||||          S )Nra   rb   re   s
          rB   rk   z/NumPyRandomGeneratorType_integers.<locals>.impl   s    -c4.9;H H H 
Ka eCjjuT{{Sjx 2CdEJJJeCjjuT{{Sjx 2CdEJJJrD   )rV   r   rG   Booleanboolintr3   r4   r5   r6   r   r7   r8   r9   r   r   bool_r0   random_bounded_bool_filliinfo
ValueErrorgetattrbitsminmaxr
   int64rJ   )rf   rY   rZ   rI   r8   r[   r@   _dtypei_infork   rh   ri   rj   s             @@@rB   !NumPyRandomGeneratorType_integersr{   V   sR    emmT30168 8 8u}emS"#)+ + +5=$/<<<$&& z%'' % &28E??++	E5,	-	- &% % & & 	& !:	*Xf%%FF 	* 	* 	* ) * * *	* >CCCCE Ejj4 #'+x%	K 	K 	K 	K 	K 	K 	K 	K 4'+x%	K 	K 	K 	K 	K 	K 	K 	K s   $E9 9Fshufflec                     t          |t          j        gd           t          |t          t          j        gd           dd}|S )Nxaxisr   c                    |dk     r
||j         z   }||j         dz
  k    s|dk     rt          d          t          j        |d|          }t          j        |d                   }t          t          |          dz
  dd          D ]X}t          j        t          j
        | j        |                    }||k    r5||df         |d<   ||df         ||df<   |||df<   Yd S )Nr   ra   z)Axis is out of bounds for the given array)r   .r\   .)ndim
IndexErrorr7   swapaxes
empty_likerangelenr   intpr0   random_intervalrd   )rf   r~   r   zbufijs          rB   rk   z.NumPyRandomGeneratorType_shuffle.<locals>.impl   s    !88!&=D!&1*qHIIIK1d##mAfI&&s1vvz1b)) 	 	A
>9$:L:;= = > >AAvvCyCH!S&	AafIAafII	 	rD   r   )rV   r   Arrayro   rG   )rf   r~   r   rk   s       rB    NumPyRandomGeneratorType_shuffler      sL    EK=#&&&sEM*F333   $ KrD   permutationc                     t          |t          j        t          j        gd           t          |t          t          j        gd           t          |t          j                  dfd	}|S )Nr~   r   r   c                     r*t          j        |          }|                     |           n+|                                }|                     ||           |S )N)r   )r7   aranger|   copy)rf   r~   r   new_arrIS_INTs       rB   rk   z2NumPyRandomGeneratorType_permutation.<locals>.impl   sU     	-illGLL!!!!ffhhGLLtL,,,rD   r   )rV   r   r   rG   ro   r3   )rf   r~   r   rk   r   s       @rB   $NumPyRandomGeneratorType_permutationr      sm    EK/555sEM*F3335=))F      KrD   randomc                    t          t          t          |d          \  t          |t          j                  r|j        }t          |          rd t          j	        ffd	}|S t          |           d t          j	        ffd	}|S )Nr   c                 6      | j                             S Nrd   rf   rI   r8   	dist_funcr@   s      rB   rk   z-NumPyRandomGeneratorType_random.<locals>.impl        54#566777rD   c                     t          j        ||          }|j        }t          |j                  D ]} | j                  ||<   |S Nr8   r7   emptyflatr   rI   rd   rf   rI   r8   outout_fr   r   s         rB   rk   z-NumPyRandomGeneratorType_random.<locals>.impl   R    (4u---CHE38__ 9 9$9T%788aJrD   )rC   r   r	   r3   r   r4   r5   r
   r7   r;   rJ   rf   rI   r8   rk   r   r@   s       @@rB   NumPyRandomGeneratorType_randomr      s    '
K(-x9 9Iu$&& z4  
 	8 	8 	8 	8 	8 	8 	84 
 	 	 	 	 	 	 rD   standard_exponentialzigc                    t          |t          j        t          gd           t	          t
          t          |          \  t	          t          t          |          \  t          |t          j
                  r|j        }t          |          rd t          j        dffd	}|S t          |           d t          j        dffd	}|S )Nmethodr   c                     |dk    r  | j                             S |dk    r  | j                             S t          d          )Nr   inv$Method must be either 'zig' or 'inv')rd   rs   )rf   rI   r8   r   r   dist_func_invr@   s       rB   rk   z;NumPyRandomGeneratorType_standard_exponential.<locals>.impl  s^    uYYt'9::;;;5u]]4+=>>??? !GHHHrD   c                 $   t          j        ||          }|j        }|dk    r+t          |j                  D ]} | j                  ||<   n@|dk    r+t          |j                  D ]} | j                  ||<   nt          d          |S )Nr   r   r   r   )r7   r   r   r   rI   rd   rs   )	rf   rI   r8   r   r   r   r   r   r   s	          rB   rk   z;NumPyRandomGeneratorType_standard_exponential.<locals>.impl  s    (4u---CHEsx = =A(y);<<E!HH=5sx A AA,}T-?@@E!HHA !!GHHHJrD   )rV   r   UnicodeTypestrrC   r   r   r   r   r3   r4   r5   r
   r7   r;   rJ   )rf   rI   r8   r   rk   r   r   r@   s        @@@rB   -NumPyRandomGeneratorType_standard_exponentialr      s    *C0(;;;+)' M5 ((E(C(-/ /Iu $&& z4  
5 	I 	I 	I 	I 	I 	I 	I 	I 4 
5 	 	 	 	 	 	 	 rD   standard_normalc                    t          t          t          |          \  t          |t          j                  r|j        }t          |          rd t          j	        ffd	}|S t          |           d t          j	        ffd	}|S )Nc                 6      | j                             S r   r   r   s      rB   rk   z6NumPyRandomGeneratorType_standard_normal.<locals>.impl/  r   rD   c                     t          j        ||          }|j        }t          |j                  D ]} | j                  ||<   |S r   r   r   s         rB   rk   z6NumPyRandomGeneratorType_standard_normal.<locals>.impl5  r   rD   )rC   r   r   r3   r   r4   r5   r
   r7   r;   rJ   r   s       @@rB   (NumPyRandomGeneratorType_standard_normalr   &  s    '(@(>(-/ /Iu $&& z4  
 	8 	8 	8 	8 	8 	8 	84 
 	 	 	 	 	 	 rD   standard_gammac                 x   t          |t          j        t          j        t          t
          gd           t          t          t          |          \  t          |t          j
                  r|j        }t          |          rd t          j        ffd	}|S t          |           d t          j        ffd	}|S )Nshapec                 8      | j         |                    S r   r   )rf   r   rI   r8   r   r@   s       rB   rk   z5NumPyRandomGeneratorType_standard_gamma.<locals>.implJ  s"    54#5u==>>>rD   c                     t          j        ||          }|j        }t          |j                  D ]} | j        |          ||<   |S r   r   )rf   r   rI   r8   r   r   r   r   s          rB   rk   z5NumPyRandomGeneratorType_standard_gamma.<locals>.implP  sV    (4u---CHE38__ @ @$9T%7??aJrD   )rV   r   FloatrG   ro   floatrC   r   r   r3   r4   r5   r
   r7   r;   rJ   )rf   r   rI   r8   rk   r   r@   s        @@rB   'NumPyRandomGeneratorType_standard_gammar   ?  s     U]C?III'(?(=(-/ /Iu $&& z4 #'rz 	? 	? 	? 	? 	? 	? 	?4#'rz 	 	 	 	 	 	 rD   normal              ?c                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nlocscaler   r   c                 .    t          | j        ||          S r   )r   rd   rf   r   r   rI   s       rB   rk   z-NumPyRandomGeneratorType_normal.<locals>.implc  s     !3S%@@@rD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r;   r   r   rI   r   rd   rf   r   r   rI   r   r   r   s          rB   rk   z-NumPyRandomGeneratorType_normal.<locals>.impli  sW    (4rz222CHE38__ I I();S%HHaJrD   r   r   NrV   r   r   rG   ro   r   r3   r4   r5   r
   rJ   rf   r   r   rI   rk   s        rB   NumPyRandomGeneratorType_normalr   Z  s     ek5=#u=uEEEU]C?III$&& z4 	A 	A 	A 	A4	 	 	 	 rD   uniformc                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )NrY   rZ   r   r   c                 4    t          | j        |||z
            S r   )r   rd   )rf   rY   rZ   rI   s       rB   rk   z.NumPyRandomGeneratorType_uniform.<locals>.impl|  s    !$"4c4#:FFFrD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        |||z
            ||<   |S r   )r7   r   r;   r   r   rI   r   rd   )rf   rY   rZ   rI   r   r   r   s          rB   rk   z.NumPyRandomGeneratorType_uniform.<locals>.impl  s[    (4rz222CHE38__ O O)$*<c4#:NNaJrD   r   r   )rf   rY   rZ   rI   rk   s        rB    NumPyRandomGeneratorType_uniformr   s  s     ek5=#u=uEEEu{EM3>GGG$&& z4 	G 	G 	G 	G4	 	 	 	 rD   exponentialc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   r   c                 ,    t          | j        |          S r   )r   rd   rf   r   rI   s      rB   rk   z2NumPyRandomGeneratorType_exponential.<locals>.impl  s    %d&8%@@@rD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   r;   r   r   rI   r   rd   rf   r   rI   r   r   r   s         rB   rk   z2NumPyRandomGeneratorType_exponential.<locals>.impl  sU    (4rz222CHE38__ I I-d.@%HHaJrD   r   Nr   rf   r   rI   rk   s       rB   $NumPyRandomGeneratorType_exponentialr     s    U]C?III$&& z4 	A 	A 	A 	A4	 	 	 	 rD   gammac                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   r   r   c                 .    t          | j        ||          S r   )r   rd   )rf   r   r   rI   s       rB   rk   z,NumPyRandomGeneratorType_gamma.<locals>.impl  s     2E5AAArD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r;   r   r   rI   r   rd   )rf   r   r   rI   r   r   r   s          rB   rk   z,NumPyRandomGeneratorType_gamma.<locals>.impl  sW    (4rz222CHE38__ J J'(:E5IIaJrD   r   r   )rf   r   r   rI   rk   s        rB   NumPyRandomGeneratorType_gammar     s    U]C?IIIU]C?III$&& z4 	B 	B 	B 	B4	 	 	 	 rD   betac                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nabc                 .    t          | j        ||          S r   )r   rd   )rf   r   r   rI   s       rB   rk   z+NumPyRandomGeneratorType_beta.<locals>.impl  s    t11a888rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r   r   rI   r   rd   )rf   r   r   rI   r   r   r   s          rB   rk   z+NumPyRandomGeneratorType_beta.<locals>.impl  sN    (4..CHE38__ A A&t'91a@@aJrD   r   r   )rf   r   r   rI   rk   s        rB   NumPyRandomGeneratorType_betar     s    EKU;SAAAEKU;SAAA$&& z4 	9 	9 	9 	94	 	 	 	 rD   fc                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Ndfnumdfdenc                 .    t          | j        ||          S r   )r   rd   )rf   r   r   rI   s       rB   rk   z(NumPyRandomGeneratorType_f.<locals>.impl  s    D.u===rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r   r   rI   r   rd   )rf   r   r   rI   r   r   r   s          rB   rk   z(NumPyRandomGeneratorType_f.<locals>.impl  sN    (4..CHE38__ F F#D$6uEEaJrD   r   r   )rf   r   r   rI   rk   s        rB   NumPyRandomGeneratorType_fr     s    U]C?IIIU]C?III$&& z4 	> 	> 	> 	>4	 	 	 	 rD   	chisquarec                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Ndfc                 ,    t          | j        |          S r   )r   rd   rf   r   rI   s      rB   rk   z0NumPyRandomGeneratorType_chisquare.<locals>.impl  s    #D$6;;;rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   r   r   rI   r   rd   rf   r   rI   r   r   r   s         rB   rk   z0NumPyRandomGeneratorType_chisquare.<locals>.impl  sL    (4..CHE38__ D D+D,>CCaJrD   r   r   rf   r   rI   rk   s       rB   "NumPyRandomGeneratorType_chisquarer     s    U[%-e<dCCC$&& z4 	< 	< 	< 	<4	 	 	 	 rD   standard_cauchyc                     t          |t          j                  r|j        }t	          |          rdd}|S t          |           dd}|S )Nc                 *    t          | j                  S r   )r   rd   )rf   rI   s     rB   rk   z6NumPyRandomGeneratorType_standard_cauchy.<locals>.impl  s    )$*<===rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j                  ||<   |S r   )r7   r   r   r   rI   r   rd   )rf   rI   r   r   r   s        rB   rk   z6NumPyRandomGeneratorType_standard_cauchy.<locals>.impl  sJ    (4..CHE38__ F F1$2DEEaJrD   r   )r3   r   r4   r5   r
   rJ   )rf   rI   rk   s      rB   (NumPyRandomGeneratorType_standard_cauchyr    sq     $&& z4 	> 	> 	> 	>4	 	 	 	 rD   paretoc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   c                 ,    t          | j        |          S r   )r   rd   rf   r   rI   s      rB   rk   z-NumPyRandomGeneratorType_pareto.<locals>.impl  s     !3Q777rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   r   r   rI   r   rd   rf   r   rI   r   r   r   s         rB   rk   z-NumPyRandomGeneratorType_pareto.<locals>.impl$  sL    (4..CHE38__ @ @();Q??aJrD   r   r   rf   r   rI   rk   s       rB   NumPyRandomGeneratorType_paretor	    s    EKU;SAAA$&& z4 	8 	8 	8 	84	 	 	 	 rD   weibullc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   c                 ,    t          | j        |          S r   )r    rd   r  s      rB   rk   z.NumPyRandomGeneratorType_weibull.<locals>.impl4  s    !$"4a888rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   r   r   rI   r    rd   r  s         rB   rk   z.NumPyRandomGeneratorType_weibull.<locals>.impl:  sL    (4..CHE38__ A A)$*<a@@aJrD   r   r   r  s       rB    NumPyRandomGeneratorType_weibullr  -  s    EKU;SAAA$&& z4 	9 	9 	9 	94	 	 	 	 rD   powerc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   c                 ,    t          | j        |          S r   )r   rd   r  s      rB   rk   z,NumPyRandomGeneratorType_power.<locals>.implJ  s     2A666rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   r   r   rI   r   rd   r  s         rB   rk   z,NumPyRandomGeneratorType_power.<locals>.implP  sJ    (4..CHE38__ ? ?'(:A>>aJrD   r   r   r  s       rB   NumPyRandomGeneratorType_powerr  C  s    EKU;SAAA$&& z4 	7 	7 	7 	74	 	 	 	 rD   laplacec                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   r   r   r   c                 .    t          | j        ||          S r   )r!   rd   r   s       rB   rk   z.NumPyRandomGeneratorType_laplace.<locals>.impla  s    !$"4c5AAArD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r   r   rI   r!   rd   r   s          rB   rk   z.NumPyRandomGeneratorType_laplace.<locals>.implg  sN    (4..CHE38__ J J)$*<c5IIaJrD   r   r   r   s        rB    NumPyRandomGeneratorType_laplacer  Y  s    ek5=#u=uEEEU]C?III$&& z4 	B 	B 	B 	B4	 	 	 	 rD   logisticc                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   r   r   r   c                 .    t          | j        ||          S r   )r"   rd   r   s       rB   rk   z/NumPyRandomGeneratorType_logistic.<locals>.implx  s    "4#5sEBBBrD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r   r   rI   r"   rd   r   s          rB   rk   z/NumPyRandomGeneratorType_logistic.<locals>.impl~  sN    (4..CHE38__ K K*4+=sEJJaJrD   r   r   r   s        rB   !NumPyRandomGeneratorType_logisticr  p  s    ek5=#u=uEEEU]C?III$&& z4 	C 	C 	C 	C4	 	 	 	 rD   	lognormalc                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nmeansigmar   r   c                 .    t          | j        ||          S r   )r#   rd   )rf   r   r!  rI   s       rB   rk   z0NumPyRandomGeneratorType_lognormal.<locals>.impl  s    #D$6eDDDrD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r   r   rI   r#   rd   )rf   r   r!  rI   r   r   r   s          rB   rk   z0NumPyRandomGeneratorType_lognormal.<locals>.impl  sN    (4..CHE38__ M M+D,>eLLaJrD   r   r   )rf   r   r!  rI   rk   s        rB   "NumPyRandomGeneratorType_lognormalr$    s    u{EM3>GGGU]C?III$&& z4 	E 	E 	E 	E4	 	 	 	 rD   rayleighc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   r   c                 ,    t          | j        |          S r   )r$   rd   r   s      rB   rk   z/NumPyRandomGeneratorType_rayleigh.<locals>.impl  s    "4#5u===rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   r   r   rI   r$   rd   r   s         rB   rk   z/NumPyRandomGeneratorType_rayleigh.<locals>.impl  sL    (4..CHE38__ F F*4+=uEEaJrD   r   r   r   s       rB   !NumPyRandomGeneratorType_rayleighr)    s    U]C?III$&& z4 	> 	> 	> 	>4	 	 	 	 rD   
standard_tc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   c                 ,    t          | j        |          S r   )r%   rd   r   s      rB   rk   z1NumPyRandomGeneratorType_standard_t.<locals>.impl  s    $T%7<<<rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   r   r   rI   r%   rd   r   s         rB   rk   z1NumPyRandomGeneratorType_standard_t.<locals>.impl  sL    (4..CHE38__ E E,T-?DDaJrD   r   r   r   s       rB   #NumPyRandomGeneratorType_standard_tr.    s    U[%-e<dCCC$&& z4 	= 	= 	= 	=4	 	 	 	 rD   waldc                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   r   c                 .    t          | j        ||          S r   )r&   rd   )rf   r   r   rI   s       rB   rk   z+NumPyRandomGeneratorType_wald.<locals>.impl  s    t14???rD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r   r   rI   r&   rd   )rf   r   r   rI   r   r   r   s          rB   rk   z+NumPyRandomGeneratorType_wald.<locals>.impl  sN    (4..CHE38__ H H&t'94GGaJrD   r   r   )rf   r   r   rI   rk   s        rB   NumPyRandomGeneratorType_waldr3    s    u{EM3>GGGU]C?III$&& z4 	@ 	@ 	@ 	@4	 	 	 	 rD   	geometricc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Npc                 P    t          j        t          | j        |                    S r   )r7   rx   r'   rd   )rf   r6  rI   s      rB   rk   z0NumPyRandomGeneratorType_geometric.<locals>.impl  s     8,T-?CCDDDrD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   rx   r   r   rI   r'   rd   )rf   r6  rI   r   r   r   s         rB   rk   z0NumPyRandomGeneratorType_geometric.<locals>.impl  sU    (4rx000CHE38__ C C+D,>BBaJrD   r   r   )rf   r6  rI   rk   s       rB   "NumPyRandomGeneratorType_geometricr9    s    EKU;SAAA$&& z4 	E 	E 	E 	E4	 	 	 	 rD   zipfc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nr   c                 P    t          j        t          | j        |                    S r   )r7   rx   r(   rd   r  s      rB   rk   z+NumPyRandomGeneratorType_zipf.<locals>.impl  s    8K(:A>>???rD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   rx   r   r   rI   r(   rd   r  s         rB   rk   z+NumPyRandomGeneratorType_zipf.<locals>.impl  sS    (4rx000CHE38__ > >&t'91==aJrD   r   r   r  s       rB   NumPyRandomGeneratorType_zipfr>    s    EKU;SAAA$&& z4 	@ 	@ 	@ 	@4	 	 	 	 rD   
triangularc                    t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nleftmoderightc                 0    t          | j        |||          S r   )r)   rd   )rf   rA  rB  rC  rI   s        rB   rk   z1NumPyRandomGeneratorType_triangular.<locals>.impl  s    $T%7tUKKKrD   c                     t          j        |          }|j        }t          |j                  D ]}t          | j        |||          ||<   |S r   )r7   r   r   r   rI   r)   rd   )rf   rA  rB  rC  rI   r   r   r   s           rB   rk   z1NumPyRandomGeneratorType_triangular.<locals>.impl  sW    (4..CHE38__ @ @,T-?-14@ @aJrD   r   r   )rf   rA  rB  rC  rI   rk   s         rB   #NumPyRandomGeneratorType_triangularrF    s    u{EM3>GGGu{EM3>GGGU]C?III$&& z4 	L 	L 	L 	L4	 	 	 	 rD   poissonc                     t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nlamc                 P    t          j        t          | j        |                    S r   )r7   rx   r*   rd   )rf   rI  rI   s      rB   rk   z.NumPyRandomGeneratorType_poisson.<locals>.impl-  s    8N4+=sCCDDDrD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   rx   r   r   rI   r*   rd   )rf   rI  rI   r   r   r   s         rB   rk   z.NumPyRandomGeneratorType_poisson.<locals>.impl3  sU    (4rx000CHE38__ C C)$*<cBBaJrD   r   r   )rf   rI  rI   rk   s       rB    NumPyRandomGeneratorType_poissonrL  &  s    ek5=#u=uEEE$&& z4 	E 	E 	E 	E4	 	 	 	 rD   negative_binomialc                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )Nnr6  c                 R    t          j        t          | j        ||                    S r   )r7   rx   r+   rd   rf   rO  r6  rI   s       rB   rk   z8NumPyRandomGeneratorType_negative_binomial.<locals>.implD  s"    84T5GANNOOOrD   c                     t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   rx   r   r   rI   r+   rd   )rf   rO  r6  rI   r   r   r   s          rB   rk   z8NumPyRandomGeneratorType_negative_binomial.<locals>.implJ  sW    (4rx000CHE38__ N N3D4F1MMaJrD   r   r   rf   rO  r6  rI   rk   s        rB   *NumPyRandomGeneratorType_negative_binomialrT  <  s    EKU;SAAAEKU;SAAA$&& z4 	P 	P 	P 	P4	 	 	 	 rD   noncentral_chisquarec                    t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          d             t          |          rdfd	}|S t          |           dfd	}|S )Nr   noncc                 Z    | dk    rt          d          |dk     rt          d          d S )Nr   zdf <= 0nonc < 0rs   )r   rW  s     rB   check_arg_boundszGNumPyRandomGeneratorType_noncentral_chisquare.<locals>.check_arg_boundsZ  s7    77Y'''!88Z((( 8rD   c                 l     ||           t          j        t          | j        ||                    S r   )r7   r;   r-   rd   )rf   r   rW  rI   r[  s       rB   rk   z;NumPyRandomGeneratorType_noncentral_chisquare.<locals>.implb  sF    R&&&:9$:L:<dD D E E ErD   c                      ||           t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        ||          ||<   |S r   )r7   r   r;   r   r   rI   r-   rd   )rf   r   rW  rI   r   r   r   r[  s          rB   rk   z;NumPyRandomGeneratorType_noncentral_chisquare.<locals>.implj  sr    R&&&(4rz222CHE38__ A A6t7I794A AaJrD   r   rV   r   r   rG   ro   r   r3   r4   r5   r   r
   rJ   )rf   r   rW  rI   rk   r[  s        @rB   -NumPyRandomGeneratorType_noncentral_chisquarer_  S  s    U[%-e<dCCCu{EM3>GGG$&& z) ) ) 4 	E 	E 	E 	E 	E 	E 4	 	 	 	 	 	 rD   noncentral_fc                    t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          d             t          |          rdfd	}|S t          |           dfd	}|S )Nr   r   rW  c                     | dk    rt          d          |dk    rt          d          |dk     rt          d          d S )Nr   z
dfnum <= 0z
dfden <= 0rY  rZ  )r   r   rW  s      rB   r[  z?NumPyRandomGeneratorType_noncentral_f.<locals>.check_arg_bounds}  sN    A::\***A::\***!88Z((( 8rD   c                 p     |||           t          j        t          | j        |||                    S r   )r7   r;   r.   rd   )rf   r   r   rW  rI   r[  s        rB   rk   z3NumPyRandomGeneratorType_noncentral_f.<locals>.impl  sJ    UE4000:1$2D27F F G G GrD   c                      |||           t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        |||          ||<   |S r   )r7   r   r;   r   r   rI   r.   rd   )	rf   r   r   rW  rI   r   r   r   r[  s	           rB   rk   z3NumPyRandomGeneratorType_noncentral_f.<locals>.impl  sv    UE4000(4rz222CHE38__ C C.t/A/4eTC CaJrD   r   r^  )rf   r   r   rW  rI   rk   r[  s         @rB   %NumPyRandomGeneratorType_noncentral_fre  u  s   U]C?IIIU]C?IIIu{EM3>GGG$&& z) ) ) 4 	G 	G 	G 	G 	G 	G 4	 	 	 	 	 	 rD   	logseriesc                 (   t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          d             t          |          rdfd	}|S t          |           dfd	}|S )Nr6  c                 d    | dk     s| dk    st          j        |           rt          d          d S )Nr   ra   zp < 0, p >= 1 or p is NaN)r7   isnanrs   )r6  s    rB   r[  z<NumPyRandomGeneratorType_logseries.<locals>.check_arg_bounds  s5    q55AFFbhqkkF8999 FrD   c                 h     |           t          j        t          | j        |                    S r   )r7   rx   r,   rd   )rf   r6  rI   r[  s      rB   rk   z0NumPyRandomGeneratorType_logseries.<locals>.impl  s2    Q8,T-?CCDDDrD   c                      |           t          j        |t           j                  }|j        }t	          |j                  D ]}t          | j        |          ||<   |S r   )r7   r   rx   r   r   rI   r,   rd   )rf   r6  rI   r   r   r   r[  s         rB   rk   z0NumPyRandomGeneratorType_logseries.<locals>.impl  sg    Q(4rx000CHE38__ C C+D,>BBaJrD   r   r^  )rf   r6  rI   rk   r[  s       @rB   "NumPyRandomGeneratorType_logseriesrl    s    EKU;SAAA$&& z: : : 4 	E 	E 	E 	E 	E 	E 4	 	 	 	 	 	 rD   binomialc                 d   t          |t          j        t          j        t          t
          gd           t          |t          j        t          j        t          t
          gd           t          |t          j                  r|j        }t          |          rdd}|S t          |           dd}|S )NrO  r6  c                 R    t          j        t          | j        ||                    S r   )r7   rx   r/   rd   rQ  s       rB   rk   z/NumPyRandomGeneratorType_binomial.<locals>.impl  s!    8OD,>1EEFFFrD   c                     t          j        |t           j                  }t          j        |          D ]}t	          | j        ||          ||<   |S r   )r7   r   rx   ndindexr/   rd   )rf   rO  r6  rI   r   r   s         rB   rk   z/NumPyRandomGeneratorType_binomial.<locals>.impl  sR    (4rx000CZ%% C C();QBBAJrD   r   r   rS  s        rB   !NumPyRandomGeneratorType_binomialrr    s    EKU;SAAAEKU;SAAA$&& z4 	G 	G 	G 	G4	 	 	 	
 rD   )r1   r   r   r   r   )`__doc__numpyr7   
numba.corer   numba.core.extendingr   r   numba.np.numpy_supportr   r   numba.np.random.generator_corer   r	   r
   numba.core.errorsr   numba.core.types.containersr   r   numba.np.random.distributionsr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   numba.np.randomr0   rC   rJ   rV   NumPyRandomGeneratorTyperx   r{   r   r   r;   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r  r  r  r$  r)  r.  r3  r9  r>  rF  rL  rT  r_  re  rl  rr  rM   rD   rB   <module>r~     s4	              B B B B B B B B 7 7 7 7 7 7 7 7 B B B B B B B B . . . . . . ) ) ) ) ) ) 7 7 7 7 7 7 7 7H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H + * * * * *   >P P P= = =" /<<<@,.HuP P P =<Pn /;;   <;8 /??   @?( /::/32:    ;:. /1GHH=A8:
9>) ) ) IH)Z /1BCC8<BJ    DC0 /1ABB>B24*   CB4 /::9<)-   ;:0 /;;9<*.   <;0 /??   @?, /99   :9. /88   98. /55   65. /==   >=* /1BCC   DC* /::   ;:* /;;   <;* /99   :9* /;;   <;, /<<   =<, /==   >=, /<<   =<* />>   ?>* /88   98, /==   >=* /88   98* />>   ?>0 /;;   <;* /1DEE   FE, /1GHH   IHB /@@! ! ! A@!H /==   >=8 /<<   =<  rD   