Ë
    qwj3 ã                   óØ  — d dl mZ d dlmZ d dlmZmZmZmZ	 d dl
mc mZ d dlmZ d dlmc mZ d dl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 d dlZ dd	l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' dd
l(m)Z)m*Z*m+Z+ ddl,m-Z-  G d„ de"«      Z. e.d¬«      Z/ G d„ de.«      Z0 e0dd¬«      Z1 G d„ de"«      Z2 e2d¬«      Z3 G d„ de"«      Z4 e4d¬«      Z5 G d„ de"«      Z6 e6d¬«      Z7 G d„ de"«      Z8 e8ddd ¬!«      Z9 G d"„ d#e"«      Z: e:d$¬«      Z; G d%„ d&e"«      Z< e<d'¬«      Z= G d(„ d)e"«      Z> e>dd*d+¬!«      Z? G d,„ d-e"«      Z@ e@d.d/¬0«      ZA G d1„ d2e"«      ZB eBd d3d4¬!«      ZC G d5„ d6e"«      ZD eDd7d d8¬9«      ZE G d:„ d;e"«      ZF eFd<d=¬0«      ZG G d>„ d?e"«      ZH eHdd@dA¬!«      ZI G dB„ dCe"«      ZJ eJddDdE¬!«      ZK G dF„ dGe"«      ZL eLe jš                   dHdI¬!«      ZN G dJ„ dKe"«      ZO eOdLdMdN¬O«      ZPdgdP„ZQdhdQ„ZRdidR„ZSePeOcZTZUeQj­                  eTeU«      eP_Q        eRj­                  eTeU«      eP_R        eSj­                  eTeU«      eP_S         G dS„ dTe'«      ZW G dU„ dVe"«      ZX eXe jš                   dWdX¬!«      ZY G dY„ dZe"«      ZZ eZd[d¬\«      Z[ G d]„ d^e"«      Z\ G d_„ d`e\«      Z] e]dadb¬0«      Z^ G dc„ dde\«      Z_ e_dedf¬0«      Z` ea eb«       jÇ                  «       jÉ                  «       «      Ze e#eee"«      \  ZfZgefegz   Zhy)jé    )Úpartial)Úspecial)ÚentrÚ	logsumexpÚbetalnÚgammalnN)Úrng_integers)Úinterp1d)
ÚfloorÚceilÚlogÚexpÚsqrtÚlog1pÚexpm1ÚtanhÚcoshÚsinhé   )Úrv_discreteÚget_distribution_namesÚ_vectorize_rvs_over_shapesÚ
_ShapeInfoÚ_isintegralÚrv_discrete_frozen)Ú_PyFishersNCHypergeometricÚ_PyWalleniusNCHypergeometricÚ_PyStochasticLib3)Ú_poisson_binomc                   ó\   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zdd„Zd„ Zy)Ú	binom_gena2  A binomial discrete random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `binom` is:

    .. math::

       f(k) = \binom{n}{k} p^k (1-p)^{n-k}

    for :math:`k \in \{0, 1, \dots, n\}`, :math:`0 \leq p \leq 1`

    `binom` takes :math:`n` and :math:`p` as shape parameters,
    where :math:`p` is the probability of a single success
    and :math:`1-p` is the probability of a single failure.

    This distribution uses routines from the Boost Math C++ library for
    the computation of the ``pmf``, ``cdf``, ``sf``, ``ppf`` and ``isf``
    methods. [1]_

    %(after_notes)s

    References
    ----------
    .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.

    %(example)s

    See Also
    --------
    hypergeom, nbinom, nhypergeom

    c                 óZ   — t        dddt        j                  fd«      t        dddd«      gS ©	NÚnTr   ©TFÚpF©r   r   ©TT©r   ÚnpÚinf©Úselfs    úa/var/www/html/newmanjeet/manjet/venv/lib/python3.12/site-packages/scipy/stats/_discrete_distns.pyÚ_shape_infozbinom_gen._shape_info@   ó0   € Ü˜3  q¬"¯&©& k°=ÓAÜ˜3  v¨|Ó<ð>ð 	>ó    Nc                 ó(   — |j                  |||«      S ©N)Úbinomial©r-   r$   r&   ÚsizeÚrandom_states        r.   Ú_rvszbinom_gen._rvsD   s   € Ø×$Ñ$ Q¨¨4Ó0Ð0r1   c                 ó<   — |dk\  t        |«      z  |dk\  z  |dk  z  S ©Nr   r   ©r   ©r-   r$   r&   s      r.   Ú	_argcheckzbinom_gen._argcheckG   s'   € Ø�Q‘œ+ a›.Ñ(¨A°©FÑ3°q¸A±vÑ>Ð>r1   c                 ó   — | j                   |fS r3   ©Úar<   s      r.   Ú_get_supportzbinom_gen._get_supportJ   s   € Ø�v‰v�qˆyÐr1   c                 óÞ   — t        |«      }t        |dz   «      t        |dz   «      t        ||z
  dz   «      z   z
  }|t        j                  ||«      z   t        j                  ||z
  | «      z   S ©Nr   )r   Úgamlnr   ÚxlogyÚxlog1py)r-   Úxr$   r&   ÚkÚcombilns         r.   Ú_logpmfzbinom_gen._logpmfM   sb   € Ü�!‹HˆÜ˜˜1™“:¤ q¨¡s£¬e°A°a±C¸±E«lÑ!:Ñ;ˆØœŸ™ q¨!Ó,Ñ,¬w¯©¸qÀ¹sÀQÀBÓ/GÑGÐGr1   c                 ó0   — t        j                  |||«      S r3   )ÚscuÚ
_binom_pmf©r-   rG   r$   r&   s       r.   Ú_pmfzbinom_gen._pmfR   s   € ä�~‰~˜a  AÓ&Ð&r1   c                 óF   — t        |«      }t        j                  |||«      S r3   )r   rL   Ú
_binom_cdf©r-   rG   r$   r&   rH   s        r.   Ú_cdfzbinom_gen._cdfV   ó   € Ü�!‹HˆÜ�~‰~˜a  AÓ&Ð&r1   c                 óF   — t        |«      }t        j                  |||«      S r3   )r   rL   Ú	_binom_sfrR   s        r.   Ú_sfzbinom_gen._sfZ   s   € Ü�!‹HˆÜ�}‰}˜Q  1Ó%Ð%r1   c                 ó0   — t        j                  |||«      S r3   )rL   Ú
_binom_isfrN   s       r.   Ú_isfzbinom_gen._isf^   ó   € Ü�~‰~˜a  AÓ&Ð&r1   c                 ó0   — t        j                  |||«      S r3   )rL   Ú
_binom_ppf©r-   Úqr$   r&   s       r.   Ú_ppfzbinom_gen._ppfa   r[   r1   c                 ó„  — ||z  }||t        j                  |«      z  z
  }d\  }}d|v rR|t        j                  |«      z
  }t        j                  ||z  «      }	t        j                  |	«      }
d|z  |	z  }|
|z
  }d|v r<|t        j                  |«      z
  }||z  }t        j                  |«      }
d|z  }|
|z
  }||||fS )N©NNÚsç       @rH   ç      @)r*   Úsquarer   Ú
reciprocal)r-   r$   r&   ÚmomentsÚmuÚvarÚg1Úg2ÚpqÚnpq_sqrtÚt1Út2Únpqs                r.   Ú_statszbinom_gen._statsd   sÊ   € Ø�‰UˆØ�1”r—y‘y “|Ñ#Ñ#ˆØ‰ˆˆBØ�'‰>Ø”R—Y‘Y˜q“\Ñ!ˆBÜ—w‘w˜q 2™v“ˆHÜ—‘˜xÓ(ˆBØ˜‘'˜XÑ%ˆBØ�b‘ˆBØ�'‰>Ø”R—Y‘Y˜q“\Ñ!ˆBØ�b‘&ˆCÜ—‘˜sÓ#ˆBØ�Q‘ˆBØ�b‘ˆBØ�3˜˜BˆÐr1   c                 ó”   — t         j                  d|dz    }| j                  |||«      }t        j                  t	        |«      d¬«      S )Nr   r   ©Úaxis)r*   Úr_rO   Úsumr   )r-   r$   r&   rH   Úvalss        r.   Ú_entropyzbinom_gen._entropyv   s<   € Ü�E‰E�!�A˜‘EˆNˆØ�y‰y˜˜A˜qÓ!ˆÜ�v‰v”d˜4“j qÔ)Ð)r1   rb   ©Úmv©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r/   r8   r=   rA   rJ   rO   rS   rW   rZ   r`   rr   ry   © r1   r.   r!   r!      sE   „ ñ"òF>ó1ò?òòHò
'ò'ò&ò'ò'óó$*r1   r!   Úbinom)Únamec                   óZ   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zd„ Zd„ Zy)Úbernoulli_gena  A Bernoulli discrete random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `bernoulli` is:

    .. math::

       f(k) = \begin{cases}1-p  &\text{if } k = 0\\
                           p    &\text{if } k = 1\end{cases}

    for :math:`k` in :math:`\{0, 1\}`, :math:`0 \leq p \leq 1`

    `bernoulli` takes :math:`p` as shape parameter,
    where :math:`p` is the probability of a single success
    and :math:`1-p` is the probability of a single failure.

    %(after_notes)s

    %(example)s

    c                 ó    — t        dddd«      gS ©Nr&   Fr'   r(   ©r   r,   s    r.   r/   zbernoulli_gen._shape_info˜   ó   € Ü˜3  v¨|Ó<Ð=Ð=r1   Nc                 ó6   — t         j                  | d|||¬«      S )Nr   ©r6   r7   )r!   r8   ©r-   r&   r6   r7   s       r.   r8   zbernoulli_gen._rvs›   s   € Ü�~‰~˜d A q¨tÀ,ˆ~ÓOÐOr1   c                 ó   — |dk\  |dk  z  S r:   r�   ©r-   r&   s     r.   r=   zbernoulli_gen._argcheckž   s   € Ø�Q‘˜1 ™6Ñ"Ð"r1   c                 ó2   — | j                   | j                  fS r3   )r@   ÚbrŽ   s     r.   rA   zbernoulli_gen._get_support¡   s   € à�v‰v�t—v‘vˆ~Ðr1   c                 ó0   — t         j                  |d|«      S rC   )r‚   rJ   ©r-   rG   r&   s      r.   rJ   zbernoulli_gen._logpmf¥   s   € Ü�}‰}˜Q  1Ó%Ð%r1   c                 ó0   — t         j                  |d|«      S rC   )r‚   rO   r’   s      r.   rO   zbernoulli_gen._pmf¨   s   € ô �z‰z˜!˜Q Ó"Ð"r1   c                 ó0   — t         j                  |d|«      S rC   )r‚   rS   r’   s      r.   rS   zbernoulli_gen._cdf­   ó   € Ü�z‰z˜!˜Q Ó"Ð"r1   c                 ó0   — t         j                  |d|«      S rC   )r‚   rW   r’   s      r.   rW   zbernoulli_gen._sf°   s   € Ü�y‰y˜˜A˜qÓ!Ð!r1   c                 ó0   — t         j                  |d|«      S rC   )r‚   rZ   r’   s      r.   rZ   zbernoulli_gen._isf³   r•   r1   c                 ó0   — t         j                  |d|«      S rC   )r‚   r`   )r-   r_   r&   s      r.   r`   zbernoulli_gen._ppf¶   r•   r1   c                 ó.   — t         j                  d|«      S rC   )r‚   rr   rŽ   s     r.   rr   zbernoulli_gen._stats¹   s   € Ü�|‰|˜A˜qÓ!Ð!r1   c                 ó6   — t        |«      t        d|z
  «      z   S rC   )r   rŽ   s     r.   ry   zbernoulli_gen._entropy¼   s   € Ü�A‹wœ˜a ™c›Ñ"Ð"r1   rb   r|   r�   r1   r.   r…   r…      sD   „ ñò0>óPò#òò&ò#ò
#ò"ò#ò#ò"ó#r1   r…   Ú	bernoulli)r�   rƒ   c                   ó>   — e Zd ZdZd„ Zd
d„Zd„ Zd„ Zd„ Zd„ Z	dd	„Z
y)Úbetabinom_gena  A beta-binomial discrete random variable.

    %(before_notes)s

    Notes
    -----
    The beta-binomial distribution is a binomial distribution with a
    probability of success `p` that follows a beta distribution.

    The probability mass function for `betabinom` is:

    .. math::

       f(k) = \binom{n}{k} \frac{B(k + a, n - k + b)}{B(a, b)}

    for :math:`k \in \{0, 1, \dots, n\}`, :math:`n \geq 0`, :math:`a > 0`,
    :math:`b > 0`, where :math:`B(a, b)` is the beta function.

    `betabinom` takes :math:`n`, :math:`a`, and :math:`b` as shape parameters.

    %(after_notes)s

    References
    ----------
    .. [1] https://en.wikipedia.org/wiki/Beta-binomial_distribution

    .. versionadded:: 1.4.0

    See Also
    --------
    beta, binom

    %(example)s

    c                 ó´   — t        dddt        j                  fd«      t        dddt        j                  fd«      t        dddt        j                  fd«      gS ©	Nr$   Tr   r%   r@   F©FFr�   r)   r,   s    r.   r/   zbetabinom_gen._shape_infoç   óP   € Ü˜3  q¬"¯&©& k°=ÓAÜ˜3 ¨¬2¯6©6 {°NÓCÜ˜3 ¨¬2¯6©6 {°NÓCðEð 	Er1   Nc                 óN   — |j                  |||«      }|j                  |||«      S r3   )Úbetar4   ©r-   r$   r@   r�   r6   r7   r&   s          r.   r8   zbetabinom_gen._rvsì   s+   € Ø×Ñ˜a  DÓ)ˆØ×$Ñ$ Q¨¨4Ó0Ð0r1   c                 ó
   — d|fS ©Nr   r�   ©r-   r$   r@   r�   s       r.   rA   zbetabinom_gen._get_supportð   ó   € Ø�!ˆtˆr1   c                 ó<   — |dk\  t        |«      z  |dkD  z  |dkD  z  S r¦   r;   r§   s       r.   r=   zbetabinom_gen._argcheckó   ó'   € Ø�Q‘œ+ a›.Ñ(¨A°©EÑ2°a¸!±eÑ<Ð<r1   c                 ó¬   — t        |«      }t        |dz   «       t        ||z
  dz   |dz   «      z
  }|t        ||z   ||z
  |z   «      z   t        ||«      z
  S rC   )r   r   r   ©r-   rG   r$   r@   r�   rH   rI   s          r.   rJ   zbetabinom_gen._logpmfö   s[   € Ü�!‹HˆÜ�q˜1‘u“:�+¤ q¨1¡u¨q¡y°!°a±%Ó 8Ñ8ˆØœ  A¡ q¨1¡u¨q¡yÓ1Ñ1´F¸1¸a³LÑ@Ð@r1   c                 ó<   — t        | j                  ||||«      «      S r3   ©r   rJ   ©r-   rG   r$   r@   r�   s        r.   rO   zbetabinom_gen._pmfû   ó   € Ü�4—<‘<  1 a¨Ó+Ó,Ð,r1   c                 óD  — |||z   z  }d|z
  }||z  }|||z   |z   z  |z  |z  ||z   dz   z  }d\  }	}
d|v r3dt        |«      z  }	|	||z   d|z  z   ||z
  z  z  }	|	||z   dz   ||z   z  z  }	d|v r¯||z   j                  |j                  «      }
|
||z   dz
  d|z  z   z  }
|
d|z  |z  |dz
  z  z  }
|
d|dz  z  z  }
|
d|z  |z  |z  d|z
  z  z  }
|
d	|z  |z  |dz  z  z  }
|
||z   dz  d|z   |z   z  z  }
|
||z  |z  ||z   dz   z  ||z   dz   z  ||z   |z   z  z  }
|
dz  }
|||	|
fS )
Nr   rb   rc   ç      ð?é   rH   é   é   é   )r   ÚastypeÚdtype)r-   r$   r@   r�   rh   Úe_pÚe_qri   rj   rk   rl   s              r.   rr   zbetabinom_gen._statsþ   s®  € Ø�1�q‘5‰kˆØ�#‰gˆØ�‰WˆØ�1�q‘5˜1‘9‰o Ñ# cÑ)¨Q°©U°Q©YÑ7ˆØ‰ˆˆBØ�'‰>Ø”t˜C“y‘ˆBØ�1�q‘5˜1˜q™5‘= Q¨¡UÑ+Ñ+ˆBØ�1�q‘5˜1‘9  Q¡Ñ'Ñ'ˆBØ�'‰>Ø�a‘%—‘ §	¡	Ó*ˆBØ�1�q‘5˜1‘9˜q 1™uÑ$Ñ%ˆBØ�!�a‘%˜!‘)˜q 1™uÑ%Ñ%ˆBØ�!�a˜1‘f‘*ÑˆBØ�!�c‘'˜A‘+ ‘/ Q¨¡UÑ+Ñ+ˆBØ�"�s‘(˜S‘. 1¨¡6Ñ)Ñ)ˆBØ�1�q‘5˜Q‘, ! a¡%¨!¡)Ñ,Ñ,ˆBØ�1�q‘5˜1‘9  A¡¨¡	Ñ*¨a°!©e°a©iÑ8¸AÀ¹EÀA¹IÑFÑGˆBØ�!‰GˆBØ�3˜˜BˆÐr1   rb   rz   )r}   r~   r   r€   r/   r8   rA   r=   rJ   rO   rr   r�   r1   r.   r�   r�   Ã   s-   „ ñ"òFEó
1òò=òAò
-ôr1   r�   Ú	betabinomc                   óT   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zd„ Zy)Ú
nbinom_gena×  A negative binomial discrete random variable.

    %(before_notes)s

    Notes
    -----
    Negative binomial distribution describes a sequence of i.i.d. Bernoulli
    trials, repeated until a predefined, non-random number of successes occurs.

    The probability mass function of the number of failures for `nbinom` is:

    .. math::

       f(k) = \binom{k+n-1}{n-1} p^n (1-p)^k

    for :math:`k \ge 0`, :math:`0 < p \leq 1`

    `nbinom` takes :math:`n` and :math:`p` as shape parameters where :math:`n`
    is the number of successes, :math:`p` is the probability of a single
    success, and :math:`1-p` is the probability of a single failure.

    Another common parameterization of the negative binomial distribution is
    in terms of the mean number of failures :math:`\mu` to achieve :math:`n`
    successes. The mean :math:`\mu` is related to the probability of success
    as

    .. math::

       p = \frac{n}{n + \mu}

    The number of successes :math:`n` may also be specified in terms of a
    "dispersion", "heterogeneity", or "aggregation" parameter :math:`\alpha`,
    which relates the mean :math:`\mu` to the variance :math:`\sigma^2`,
    e.g. :math:`\sigma^2 = \mu + \alpha \mu^2`. Regardless of the convention
    used for :math:`\alpha`,

    .. math::

       p &= \frac{\mu}{\sigma^2} \\
       n &= \frac{\mu^2}{\sigma^2 - \mu}

    This distribution uses routines from the Boost Math C++ library for
    the computation of the ``pmf``, ``cdf``, ``sf``, ``ppf``, ``isf``
    and ``stats`` methods. [1]_

    %(after_notes)s

    References
    ----------
    .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.

    %(example)s

    See Also
    --------
    hypergeom, binom, nhypergeom

    c                 óZ   — t        dddt        j                  fd«      t        dddd«      gS r#   r)   r,   s    r.   r/   znbinom_gen._shape_infoS  r0   r1   Nc                 ó(   — |j                  |||«      S r3   )Únegative_binomialr5   s        r.   r8   znbinom_gen._rvsW  s   € Ø×-Ñ-¨a°°DÓ9Ð9r1   c                 ó$   — |dkD  |dkD  z  |dk  z  S r:   r�   r<   s      r.   r=   znbinom_gen._argcheckZ  s   € Ø�A‘˜!˜a™%Ñ  A¨¡FÑ+Ð+r1   c                 ó0   — t        j                  |||«      S r3   )rL   Ú_nbinom_pmfrN   s       r.   rO   znbinom_gen._pmf]  s   € ä�‰˜q ! QÓ'Ð'r1   c                 ó¦   — t        ||z   «      t        |dz   «      z
  t        |«      z
  }||t        |«      z  z   t        j                  || «      z   S rC   )rD   r   r   rF   )r-   rG   r$   r&   Úcoeffs        r.   rJ   znbinom_gen._logpmfa  sJ   € Ü�a˜‘c“
œU 1 Q¡3›ZÑ'¬%°«(Ñ2ˆØ�qœ˜Q›‘xÑ¤'§/¡/°!°a°RÓ"8Ñ8Ð8r1   c                 óF   — t        |«      }t        j                  |||«      S r3   )r   rL   Ú_nbinom_cdfrR   s        r.   rS   znbinom_gen._cdfe  s   € Ü�!‹HˆÜ�‰˜q ! QÓ'Ð'r1   c                 óJ  — t        |«      }t        j                  |||«      \  }}}| j                  |||«      }|dkD  }d„ }|}t        j                  d¬«      5   |||   ||   ||   «      ||<   t        j
                  ||    «      || <   d d d «       |S # 1 sw Y   |S xY w)Nç      à?c                 ód   — t        j                  t        j                  | dz   |d|z
  «       «      S rC   )r*   r   r   Úbetainc)rH   r$   r&   s      r.   Úf1znbinom_gen._logcdf.<locals>.f1n  s)   € Ü—8‘8œWŸ_™_¨Q°©U°A°q¸1±uÓ=Ð=Ó>Ð>r1   Úignore)Údivide)r   r*   Úbroadcast_arraysrS   Úerrstater   )	r-   rG   r$   r&   rH   ÚcdfÚcondrÌ   Úlogcdfs	            r.   Ú_logcdfznbinom_gen._logcdfi  s©   € Ü�!‹HˆÜ×%Ñ% a¨¨AÓ.‰ˆˆ1ˆaØ�i‰i˜˜1˜aÓ ˆØ�S‰yˆò	?ð ˆÜ�[‰[ Ö)Ù˜a ™g q¨¡w°°$±Ó8ˆF�4‰LÜŸF™F 3¨ u¡:Ó.ˆF�D�5‰M÷ *ð ˆ÷ *ð ˆús   Á4BÂB"c                 óF   — t        |«      }t        j                  |||«      S r3   )r   rL   Ú
_nbinom_sfrR   s        r.   rW   znbinom_gen._sfx  rT   r1   c                 óˆ   — t        j                  d¬«      5  t        j                  |||«      cd d d «       S # 1 sw Y   y xY w©NrÍ   ©Úover)r*   rÐ   rL   Ú_nbinom_isfrN   s       r.   rZ   znbinom_gen._isf|  ó*   € Ü�[‰[˜hÖ'Ü—?‘? 1 a¨Ó+÷ (×'Ò'úó	   —8¸Ac                 óˆ   — t        j                  d¬«      5  t        j                  |||«      cd d d «       S # 1 sw Y   y xY wrØ   )r*   rÐ   rL   Ú_nbinom_ppfr^   s       r.   r`   znbinom_gen._ppf€  rÜ   rÝ   c                 ó®   — t        j                  ||«      t        j                  ||«      t        j                  ||«      t        j                  ||«      fS r3   )rL   Ú_nbinom_meanÚ_nbinom_varianceÚ_nbinom_skewnessÚ_nbinom_kurtosis_excessr<   s      r.   rr   znbinom_gen._stats„  sL   € ä×Ñ˜Q Ó"Ü× Ñ   AÓ&Ü× Ñ   AÓ&Ü×'Ñ'¨¨1Ó-ð	
ð 	
r1   rb   )r}   r~   r   r€   r/   r8   r=   rO   rJ   rS   rÔ   rW   rZ   r`   rr   r�   r1   r.   r½   r½     s?   „ ñ9òt>ó:ò,ò(ò9ò(òò'ò,ò,ó
r1   r½   Únbinomc                   ó8   — e Zd ZdZd„ Zd	d„Zd„ Zd„ Zd„ Zd
d„Z	y)Úbetanbinom_genaK  A beta-negative-binomial discrete random variable.

    %(before_notes)s

    Notes
    -----
    The beta-negative-binomial distribution is a negative binomial
    distribution with a probability of success `p` that follows a
    beta distribution.

    The probability mass function for `betanbinom` is:

    .. math::

       f(k) = \binom{n + k - 1}{k} \frac{B(a + n, b + k)}{B(a, b)}

    for :math:`k \ge 0`, :math:`n \geq 0`, :math:`a > 0`,
    :math:`b > 0`, where :math:`B(a, b)` is the beta function.

    `betanbinom` takes :math:`n`, :math:`a`, and :math:`b` as shape parameters.

    %(after_notes)s

    References
    ----------
    .. [1] https://en.wikipedia.org/wiki/Beta_negative_binomial_distribution

    .. versionadded:: 1.12.0

    See Also
    --------
    betabinom : Beta binomial distribution

    %(example)s

    c                 ó´   — t        dddt        j                  fd«      t        dddt        j                  fd«      t        dddt        j                  fd«      gS rŸ   r)   r,   s    r.   r/   zbetanbinom_gen._shape_infoµ  r¡   r1   Nc                 óN   — |j                  |||«      }|j                  |||«      S r3   )r£   rÀ   r¤   s          r.   r8   zbetanbinom_gen._rvsº  s+   € Ø×Ñ˜a  DÓ)ˆØ×-Ñ-¨a°°DÓ9Ð9r1   c                 ó<   — |dk\  t        |«      z  |dkD  z  |dkD  z  S r¦   r;   r§   s       r.   r=   zbetanbinom_gen._argcheck¾  rª   r1   c                 ó®   — t        |«      }t        j                  ||z   «       t        ||dz   «      z
  }|t        ||z   ||z   «      z   t        ||«      z
  S rC   )r   r*   r   r   r¬   s          r.   rJ   zbetanbinom_gen._logpmfÁ  sS   € Ü�!‹HˆÜ—6‘6˜!˜a™%“=�.¤6¨!¨Q°©UÓ#3Ñ3ˆØœ  A¡ q¨1¡uÓ-Ñ-´°q¸!³Ñ<Ð<r1   c                 ó<   — t        | j                  ||||«      «      S r3   r®   r¯   s        r.   rO   zbetanbinom_gen._pmfÆ  r°   r1   c                 ó¨  — d„ }t        j                  |dkD  |||f|t        j                  ¬«      }d„ }t        j                  |dkD  |||f|t        j                  ¬«      }d\  }}	d„ }
d|v r-t        j                  |d	kD  |||f|
t        j                  ¬«      }d
„ }d|v r-t        j                  |dkD  |||f|t        j                  ¬«      }	||||	fS )Nc                 ó   — | |z  |dz
  z  S ©Nr²   r�   ©r$   r@   r�   s      r.   Úmeanz#betanbinom_gen._stats.<locals>.meanÌ  s   € Ø�q‘5˜A ™FÑ#Ð#r1   r   ©Ú
fill_valuec                 óN   — | |z  | |z   dz
  z  ||z   dz
  z  |dz
  |dz
  dz  z  z  S )Nr²   rd   r�   rð   s      r.   rj   z"betanbinom_gen._stats.<locals>.varÏ  sA   € Ø˜‘E˜Q ™U R™ZÑ(¨A°©E°B©JÑ7Ø˜B™ 1 r¡6¨B¡,Ñ.ñ0ð 1r1   r³   rb   c                 óŠ   — d| z  |z   dz
  d|z  |z   dz
  z  |dz
  z  t        | |z  | |z   dz
  z  ||z   dz
  z  |dz
  z  «      z  S )Nr³   r²   ç      @rd   ©r   rð   s      r.   Úskewz#betanbinom_gen._stats.<locals>.skewÔ  sl   € Ø˜‘U˜Q‘Y ‘^¨¨A©°©	°B©Ñ7Ø˜2‘vñÜ!% a¨!¡e¨q°1©u°r©zÑ&:¸aÀ!¹eÀb¹jÑ&IØ˜2‘vñ'ó " ñ ð !r1   rc   rµ   c                 óz  — |dz
  }|dz
  dz  |dz  |d|z  dz
  z  z   d|dz
  z  |z  z   z  d| dz  z  |dz   |dz  z  |dz   |dz
  z  |z  z   d|dz
  dz  z  z   z  z   d|dz
  z  | z  |dz   |dz  z  |dz   |dz
  z  |z  z   d|dz
  dz  z  z   z  z   }|d	z
  |dz
  z  |z  | z  ||z   dz
  z  || z   dz
  z  }||z  |z  dz
  S )
Nrd   r²   r´   re   rö   ç      @r³   rµ   g      @r�   )r$   r@   r�   ÚtermÚterm_2Údenominators         r.   Úkurtosisz'betanbinom_gen._stats.<locals>.kurtosisÚ  sN  € Ø˜‘FˆDØ˜2‘v ‘l a¨¡e¨a°1°q±5¸2±:Ñ.>Ñ&>Ø˜a "™f™¨Ñ)ñ'*ñ +à˜Q ™U™
 q¨2¡v°°B±Ñ&6¸!¸b¹&Ø˜R™ñ:!Ø#$ñ:%ñ '%Ø')¨Q°©V°a©KÑ'7ñ'8ñ 9ñ9ð ˜Q ™V™ qÑ(Ø˜b™& A r¡EÑ)¨Q°©V¸¸B¹Ñ,?À!Ñ,CÑCØ˜a "™f r™\Ñ)ñ*ñ+ñ	+ˆFð  ™F q¨2¡vÑ.°Ñ2°QÑ6Ø !™e b™jñ*Ø-.°©U°R©Zñ9ˆKð ˜&‘= ;Ñ.°Ñ3Ð3r1   rH   é   ©ÚxpxÚapply_wherer*   r+   )r-   r$   r@   r�   rh   rñ   ri   rj   rk   rl   rø   rþ   s               r.   rr   zbetanbinom_gen._statsÉ  sÉ   € ò	$ä�_‰_˜Q ™U Q¨¨1 I¨tÄÇÁÔGˆò	1ô �o‰o˜a !™e a¨¨A Y°ÄÇÁÔGˆØ‰ˆˆBò	!ð �'‰>Ü—‘  Q¡¨¨A¨q¨	°4ÄBÇFÁFÔKˆBò	4ð �'‰>Ü—‘  Q¡¨¨A¨q¨	°8ÌÏÉÔOˆBØ�3˜˜BˆÐr1   rb   rz   )
r}   r~   r   r€   r/   r8   r=   rJ   rO   rr   r�   r1   r.   rç   rç   �  s'   „ ñ#òHEó
:ò=ò=ò
-ô!r1   rç   Ú
betanbinomc                   óT   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zd„ Zy)Úgeom_gena5  A geometric discrete random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `geom` is:

    .. math::

        f(k) = (1-p)^{k-1} p

    for :math:`k \ge 1`, :math:`0 < p \leq 1`

    `geom` takes :math:`p` as shape parameter,
    where :math:`p` is the probability of a single success
    and :math:`1-p` is the probability of a single failure.

    Note that when drawing random samples, the probability of observations that exceed
    ``np.iinfo(np.int64).max`` increases rapidly as $p$ decreases below $10^{-17}$. For
    $p < 10^{-20}$, almost all observations would exceed the maximum ``int64``; however,
    the output dtype is always ``int64``, so these values are clipped to the maximum.

    %(after_notes)s

    See Also
    --------
    planck

    %(example)s

    c                 ó    — t        dddd«      gS r‡   rˆ   r,   s    r.   r/   zgeom_gen._shape_info  r‰   r1   Nc                 ó®   — |j                  ||¬«      }t        j                  |j                  «      j                  }t        j
                  |dk  ||«      S )N©r6   r   )Ú	geometricr*   Úiinfor¸   ÚmaxÚwhere)r-   r&   r6   r7   ÚresÚmax_ints         r.   r8   zgeom_gen._rvs  sH   € Ø×$Ñ$ Q¨TÐ$Ó2ˆô —(‘(˜3Ÿ9™9Ó%×)Ñ)ˆÜ�x‰x˜˜a™ ¨#Ó.Ð.r1   c                 ó   — |dk  |dkD  z  S ©Nr   r   r�   rŽ   s     r.   r=   zgeom_gen._argcheck  s   € Ø�Q‘˜1˜q™5Ñ!Ð!r1   c                 ó@   — t        j                  d|z
  |dz
  «      |z  S rC   )r*   Úpower©r-   rH   r&   s      r.   rO   zgeom_gen._pmf  s    € Ü�x‰x˜˜!™˜Q˜q™SÓ! AÑ%Ð%r1   c                 óN   — t        j                  |dz
  | «      t        |«      z   S rC   )r   rF   r   r  s      r.   rJ   zgeom_gen._logpmf"  s"   € Ü�‰˜q 1™u q bÓ)¬C°«FÑ2Ð2r1   c                 óJ   — t        |«      }t        t        | «      |z  «       S r3   )r   r   r   ©r-   rG   r&   rH   s       r.   rS   zgeom_gen._cdf%  s#   € Ü�!‹HˆÜ”e˜Q˜B“i ‘kÓ"Ð"Ð"r1   c                 óL   — t        j                  | j                  ||«      «      S r3   )r*   r   Ú_logsfr’   s      r.   rW   zgeom_gen._sf)  s   € Ü�v‰v�d—k‘k ! QÓ'Ó(Ð(r1   c                 ó6   — t        |«      }|t        | «      z  S r3   )r   r   r  s       r.   r  zgeom_gen._logsf,  s   € Ü�!‹HˆØ”˜�r“‰{Ðr1   c                 ó¶   — t        t        | «      t        | «      z  «      }| j                  |dz
  |«      }t        j                  ||k\  |dkD  z  |dz
  |«      S r  )r   r   rS   r*   r  )r-   r_   r&   rx   Útemps        r.   r`   zgeom_gen._ppf0  sU   € Ü”E˜1˜"“I¤ q b£	Ñ)Ó*ˆØ�y‰y˜˜a™ Ó#ˆÜ�x‰x˜ ™ t¨a¡xÑ0°$°q±&¸$Ó?Ð?r1   c                 ó�   — d|z  }d|z
  }||z  |z  }d|z
  t        |«      z  }t        j                  g d¢|«      d|z
  z  }||||fS )Nr²   rd   )r   iúÿÿÿr´   )r   r*   Úpolyval)r-   r&   ri   Úqrrj   rk   rl   s          r.   rr   zgeom_gen._stats5  sZ   € Ø�‰UˆØ�‰UˆØ�1‰f�q‰jˆØ�!‰e”t˜B“xÑˆÜ�Z‰Zš
 AÓ&¨¨A©Ñ.ˆØ�3˜˜BˆÐr1   c                 ón   — t        j                  |«       t        j                  | «      d|z
  z  |z  z
  S rï   )r*   r   r   rŽ   s     r.   ry   zgeom_gen._entropy=  s/   € Ü—‘�q“	ˆzœBŸH™H a R›L¨C°©EÑ2°QÑ6Ñ6Ð6r1   rb   )r}   r~   r   r€   r/   r8   r=   rO   rJ   rS   rW   r  r`   rr   ry   r�   r1   r.   r  r  ð  s@   „ ñòB>ó/ò"ò&ò3ò#ò)òò@ò
ó7r1   r  ÚgeomzA geometric)r@   rƒ   Úlongnamec                   óZ   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zd„ Zd„ Zd„ Zy)Úhypergeom_gena	  A hypergeometric discrete random variable.

    The hypergeometric distribution models drawing objects from a bin.
    `M` is the total number of objects, `n` is total number of Type I objects.
    The random variate represents the number of Type I objects in `N` drawn
    without replacement from the total population.

    %(before_notes)s

    Notes
    -----
    The symbols used to denote the shape parameters (`M`, `n`, and `N`) are not
    universally accepted.  See the Examples for a clarification of the
    definitions used here.

    The probability mass function is defined as,

    .. math:: p(k, M, n, N) = \frac{\binom{n}{k} \binom{M - n}{N - k}}
                                   {\binom{M}{N}}

    for :math:`k \in [\max(0, N - M + n), \min(n, N)]`, where the binomial
    coefficients are defined as,

    .. math:: \binom{n}{k} \equiv \frac{n!}{k! (n - k)!}.

    This distribution uses routines from the Boost Math C++ library for
    the computation of the ``pmf``, ``cdf``, ``sf`` and ``stats`` methods. [1]_

    %(after_notes)s

    References
    ----------
    .. [1] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.stats import hypergeom
    >>> import matplotlib.pyplot as plt

    Suppose we have a collection of 20 animals, of which 7 are dogs.  Then if
    we want to know the probability of finding a given number of dogs if we
    choose at random 12 of the 20 animals, we can initialize a frozen
    distribution and plot the probability mass function:

    >>> [M, n, N] = [20, 7, 12]
    >>> rv = hypergeom(M, n, N)
    >>> x = np.arange(0, n+1)
    >>> pmf_dogs = rv.pmf(x)

    >>> fig = plt.figure()
    >>> ax = fig.add_subplot(111)
    >>> ax.plot(x, pmf_dogs, 'bo')
    >>> ax.vlines(x, 0, pmf_dogs, lw=2)
    >>> ax.set_xlabel('# of dogs in our group of chosen animals')
    >>> ax.set_ylabel('hypergeom PMF')
    >>> plt.show()

    Instead of using a frozen distribution we can also use `hypergeom`
    methods directly.  To for example obtain the cumulative distribution
    function, use:

    >>> prb = hypergeom.cdf(x, M, n, N)

    And to generate random numbers:

    >>> R = hypergeom.rvs(M, n, N, size=10)

    See Also
    --------
    nhypergeom, binom, nbinom

    c                 ó´   — t        dddt        j                  fd«      t        dddt        j                  fd«      t        dddt        j                  fd«      gS )NÚMTr   r%   r$   ÚNr)   r,   s    r.   r/   zhypergeom_gen._shape_infoŽ  óP   € Ü˜3  q¬"¯&©& k°=ÓAÜ˜3  q¬"¯&©& k°=ÓAÜ˜3  q¬"¯&©& k°=ÓAðCð 	Cr1   Nc                 ó2   — |j                  |||z
  ||¬«      S ©Nr  )Úhypergeometric)r-   r%  r$   r&  r6   r7   s         r.   r8   zhypergeom_gen._rvs“  s    € Ø×*Ñ*¨1¨a°©c°1¸4Ð*Ó@Ð@r1   c                 óf   — t        j                  |||z
  z
  d«      t        j                  ||«      fS r¦   ©r*   ÚmaximumÚminimum)r-   r%  r$   r&  s       r.   rA   zhypergeom_gen._get_support–  s+   € Ü�z‰z˜!˜Q˜q™S™' 1Ó%¤r§z¡z°!°QÓ'7Ð7Ð7r1   c                 ó�   — |dkD  |dk\  z  |dk\  z  }|||k  ||k  z  z  }|t        |«      t        |«      z  t        |«      z  z  }|S r¦   r;   )r-   r%  r$   r&  rÒ   s        r.   r=   zhypergeom_gen._argcheck™  sY   € Ø�A‘˜!˜q™&Ñ! Q¨!¡VÑ,ˆØ��a‘˜A ™FÑ#Ñ#ˆØ”˜A“¤¨Q£Ñ/´+¸a³.Ñ@Ñ@ˆØˆr1   c                 ó  — ||}}||z
  }t        |dz   d«      t        |dz   d«      z   t        ||z
  dz   |dz   «      z   t        |dz   ||z
  dz   «      z
  t        ||z
  dz   ||z
  |z   dz   «      z
  t        |dz   d«      z
  }|S rC   ©r   )	r-   rH   r%  r$   r&  ÚtotÚgoodÚbadÚresults	            r.   rJ   zhypergeom_gen._logpmfŸ  s¥   € Ø�qˆTˆØ�D‰jˆÜ˜˜a™ Ó#¤f¨S°©U°AÓ&6Ñ6¼ÀÀAÁÀaÁÈÈ1ÉÓ9MÑMÜ˜˜1™˜d 1™f Q™hÓ'ñ(Ü*0°°1±°Q±¸¸A¹¸a¹À¹	Ó*BñCä˜˜Q™ Ó"ñ#ˆð ˆr1   c                 ó2   — t        j                  ||||«      S r3   )rL   Ú_hypergeom_pmf©r-   rH   r%  r$   r&  s        r.   rO   zhypergeom_gen._pmf§  ó   € Ü×!Ñ! ! Q¨¨1Ó-Ð-r1   c                 ó2   — t        j                  ||||«      S r3   )rL   Ú_hypergeom_cdfr8  s        r.   rS   zhypergeom_gen._cdfª  r9  r1   c                 ó~  — d|z  d|z  d|z  }}}||z
  }||dz   z  d|z  ||z
  z  z
  d|z  |z  z
  }||dz
  |z  |z  z  }|d|z  |z  ||z
  z  |z  d|z  dz
  z  z  }|||z  ||z
  z  |z  |dz
  z  |dz
  z  z  }t        j                  |||«      t        j                  |||«      t        j                  |||«      |fS )Nr²   r   re   rú   r´   rd   rö   )rL   Ú_hypergeom_meanÚ_hypergeom_varianceÚ_hypergeom_skewness)r-   r%  r$   r&  Úmrl   s         r.   rr   zhypergeom_gen._stats­  s  € Ø�q‘&˜"˜q™& " q¡&ˆaˆ1ˆØ�‰Eˆð �!�a‘%‰[˜2 ™6 Q¨¡UÑ+Ñ+¨b°1©f°q©jÑ8ˆØ
ˆq�1‰u˜‰k˜A‰oÑˆØ
ˆb�1‰f�q‰j˜A ™EÑ" QÑ&¨"¨q©&°1©*Ñ5Ñ5ˆØ
ˆa�!‰e�q˜1‘u‰o Ñ! Q¨¡VÑ,°°B±Ñ7Ñ7ˆä×Ñ  1 aÓ(Ü×#Ñ# A q¨!Ó,Ü×#Ñ# A q¨!Ó,Øð	
ð 	
r1   c                 ó¶   — t         j                  |||z
  z
  t        ||«      dz    }| j                  ||||«      }t        j                  t        |«      d¬«      S )Nr   r   rt   )r*   rv   ÚminÚpmfrw   r   )r-   r%  r$   r&  rH   rx   s         r.   ry   zhypergeom_gen._entropy¾  sM   € Ü�E‰E�!�q˜1‘u‘+œc ! Q›i¨!™mÐ,ˆØ�x‰x˜˜1˜a Ó#ˆÜ�v‰v”d˜4“j qÔ)Ð)r1   c                 ó2   — t        j                  ||||«      S r3   )rL   Ú_hypergeom_sfr8  s        r.   rW   zhypergeom_gen._sfÃ  s   € Ü× Ñ   A q¨!Ó,Ð,r1   c                 ó¬  — g }t        t        j                  ||||«      Ž D ]�  \  }}}}	|dz   |dz   z  |dz
  |	dz
  z  k  r7|j                  t	        t        | j                  ||||	«      «       «      «       ŒVt        j                  |dz   |	dz   «      }
|j                  t        | j                  |
|||	«      «      «       ŒŸ t        j                  |«      S )NrÉ   r   )Úzipr*   rÏ   Úappendr   r   rÓ   Úaranger   rJ   Úasarray©r-   rH   r%  r$   r&  r  Úquantr2  r3  ÚdrawÚk2s              r.   r  zhypergeom_gen._logsfÆ  sÅ   € ØˆÜ&)¬2×+>Ñ+>¸qÀ!ÀQÈÓ+JÓ&KÑ"ˆE�3˜˜dØ˜‘  c¡	Ñ*¨d°S©j¸TÀC¹ZÑ-HÒHà—
‘
œ5¤# d§k¡k°%¸¸dÀDÓ&IÓ"JÐ!JÓKÕLô —Y‘Y˜u q™y¨$°©(Ó3�Ø—
‘
œ9 T§\¡\°"°c¸4ÀÓ%FÓGÕHð 'Lô �z‰z˜#‹Ðr1   c                 ó¦  — g }t        t        j                  ||||«      Ž D ]š  \  }}}}	|dz   |dz   z  |dz
  |	dz
  z  kD  r7|j                  t	        t        | j                  ||||	«      «       «      «       ŒVt        j                  d|dz   «      }
|j                  t        | j                  |
|||	«      «      «       Œœ t        j                  |«      S )NrÉ   r   r   )rG  r*   rÏ   rH  r   r   ÚlogsfrI  r   rJ   rJ  rK  s              r.   rÔ   zhypergeom_gen._logcdfÒ  sÁ   € ØˆÜ&)¬2×+>Ñ+>¸qÀ!ÀQÈÓ+JÓ&KÑ"ˆE�3˜˜dØ˜‘  c¡	Ñ*¨d°S©j¸TÀC¹ZÑ-HÒHà—
‘
œ5¤# d§j¡j°¸¸TÀ4Ó&HÓ"IÐ!IÓJÕKô —Y‘Y˜q %¨!¡)Ó,�Ø—
‘
œ9 T§\¡\°"°c¸4ÀÓ%FÓGÕHð 'Lô �z‰z˜#‹Ðr1   rb   )r}   r~   r   r€   r/   r8   rA   r=   rJ   rO   rS   rr   ry   rW   r  rÔ   r�   r1   r.   r#  r#  D  sG   „ ñHòRCó
Aò8òòò.ò.ò
ò"*ò
-ò
ó
r1   r#  Ú	hypergeomc                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd
d„Zd„ Zd„ Z	d	„ Z
y)Únhypergeom_genab  A negative hypergeometric discrete random variable.

    Consider a box containing :math:`M` balls:, :math:`n` red and
    :math:`M-n` blue. We randomly sample balls from the box, one
    at a time and *without* replacement, until we have picked :math:`r`
    blue balls. `nhypergeom` is the distribution of the number of
    red balls :math:`k` we have picked.

    %(before_notes)s

    Notes
    -----
    The symbols used to denote the shape parameters (`M`, `n`, and `r`) are not
    universally accepted. See the Examples for a clarification of the
    definitions used here.

    The probability mass function is defined as,

    .. math:: f(k; M, n, r) = \frac{{{k+r-1}\choose{k}}{{M-r-k}\choose{n-k}}}
                                   {{M \choose n}}

    for :math:`k \in [0, n]`, :math:`n \in [0, M]`, :math:`r \in [0, M-n]`,
    and the binomial coefficient is:

    .. math:: \binom{n}{k} \equiv \frac{n!}{k! (n - k)!}.

    It is equivalent to observing :math:`k` successes in :math:`k+r-1`
    samples with :math:`k+r`'th sample being a failure. The former
    can be modelled as a hypergeometric distribution. The probability
    of the latter is simply the number of failures remaining
    :math:`M-n-(r-1)` divided by the size of the remaining population
    :math:`M-(k+r-1)`. This relationship can be shown as:

    .. math:: NHG(k;M,n,r) = HG(k;M,n,k+r-1)\frac{(M-n-(r-1))}{(M-(k+r-1))}

    where :math:`NHG` is probability mass function (PMF) of the
    negative hypergeometric distribution and :math:`HG` is the
    PMF of the hypergeometric distribution.

    %(after_notes)s

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.stats import nhypergeom
    >>> import matplotlib.pyplot as plt

    Suppose we have a collection of 20 animals, of which 7 are dogs.
    Then if we want to know the probability of finding a given number
    of dogs (successes) in a sample with exactly 12 animals that
    aren't dogs (failures), we can initialize a frozen distribution
    and plot the probability mass function:

    >>> M, n, r = [20, 7, 12]
    >>> rv = nhypergeom(M, n, r)
    >>> x = np.arange(0, n+2)
    >>> pmf_dogs = rv.pmf(x)

    >>> fig = plt.figure()
    >>> ax = fig.add_subplot(111)
    >>> ax.plot(x, pmf_dogs, 'bo')
    >>> ax.vlines(x, 0, pmf_dogs, lw=2)
    >>> ax.set_xlabel('# of dogs in our group with given 12 failures')
    >>> ax.set_ylabel('nhypergeom PMF')
    >>> plt.show()

    Instead of using a frozen distribution we can also use `nhypergeom`
    methods directly.  To for example obtain the probability mass
    function, use:

    >>> prb = nhypergeom.pmf(x, M, n, r)

    And to generate random numbers:

    >>> R = nhypergeom.rvs(M, n, r, size=10)

    To verify the relationship between `hypergeom` and `nhypergeom`, use:

    >>> from scipy.stats import hypergeom, nhypergeom
    >>> M, n, r = 45, 13, 8
    >>> k = 6
    >>> nhypergeom.pmf(k, M, n, r)
    0.06180776620271643
    >>> hypergeom.pmf(k, M, n, k+r-1) * (M - n - (r-1)) / (M - (k+r-1))
    0.06180776620271644

    See Also
    --------
    hypergeom, binom, nbinom

    References
    ----------
    .. [1] Negative Hypergeometric Distribution on Wikipedia
           https://en.wikipedia.org/wiki/Negative_hypergeometric_distribution

    .. [2] Negative Hypergeometric Distribution from
           http://www.math.wm.edu/~leemis/chart/UDR/PDFs/Negativehypergeometric.pdf

    c                 ó´   — t        dddt        j                  fd«      t        dddt        j                  fd«      t        dddt        j                  fd«      gS )Nr%  Tr   r%   r$   Úrr)   r,   s    r.   r/   znhypergeom_gen._shape_infoG  r'  r1   c                 ó
   — d|fS r¦   r�   )r-   r%  r$   rU  s       r.   rA   znhypergeom_gen._get_supportL  r¨   r1   c                 ó†   — |dk\  ||k  z  |dk\  z  |||z
  k  z  }|t        |«      t        |«      z  t        |«      z  z  }|S r¦   r;   )r-   r%  r$   rU  rÒ   s        r.   r=   znhypergeom_gen._argcheckO  sO   € Ø�Q‘˜1 ™6Ñ" a¨1¡fÑ-°°a¸±c±Ñ:ˆØ”˜A“¤¨Q£Ñ/´+¸a³.Ñ@Ñ@ˆØˆr1   Nc                 ó:   ‡ — t         ˆ fd„«       } ||||||¬«      S )Nc                 ó&  •— ‰j                  | ||«      \  }}t        j                  ||dz   «      }‰j                  || ||«      }t	        ||dd¬«      }	 |	|j                  |¬«      «      j                  t        «      }
|€|
j                  «       S |
S )Nr   ÚnextÚextrapolate)Úkindró   r  )	Úsupportr*   rI  rÑ   r
   Úuniformr·   ÚintÚitem)r%  r$   rU  r6   r7   r@   r�   ÚksrÑ   ÚppfÚrvsr-   s              €r.   Ú_rvs1z"nhypergeom_gen._rvs.<locals>._rvs1V  sŒ   ø€ ð —<‘<  1 aÓ(‰DˆAˆqÜ—‘˜1˜a ™cÓ"ˆBØ—(‘(˜2˜q ! QÓ'ˆCÜ˜3 ¨¸MÔJˆCÙ�l×*Ñ*°Ð*Ó5Ó6×=Ñ=¼cÓBˆCØˆ|Ø—x‘x“zÐ!ØˆJr1   r‹   ©r   )r-   r%  r$   rU  r6   r7   rd  s   `      r.   r8   znhypergeom_gen._rvsT  s*   ø€ ä	#ó		ó 
$ð		ñ �Q˜˜1 4°lÔCÐCr1   c                 óP   — t        j                  |dk7  |dk7  z  ||||fd„ d¬«      S )Nr   c                 óò   — t        | dz   |«       t        | |z   d«      z   t        || z
  dz   ||z
  |z
  dz   «      z
  t        ||z
  | z
  dz   d«      z   t        |dz   ||z
  dz   «      z   t        |dz   d«      z
  S rC   r1  )rH   r%  r$   rU  s       r.   Ú<lambda>z(nhypergeom_gen._logpmf.<locals>.<lambda>g  s‹   € Ü˜˜1™˜a“.�¤6¨!¨A©#¨q£>Ñ1Ü˜!˜A™#˜a™%  1¡ Q¡ q¡Ó)ñ*Ü,2°1°Q±3°q±5¸±7¸AÓ,>ñ?ä˜!˜A™#˜q ™s 1™uÓ%ñ&ä(.¨q°©s°A«ò7r1   ç        rò   )r  r  ©r-   rH   r%  r$   rU  s        r.   rJ   znhypergeom_gen._logpmfd  s7   € Ü�‰Ø�!‰V˜˜Q™Ñ ! Q¨¨1 ñ8ð ôð 	r1   c                 ó<   — t        | j                  ||||«      «      S r3   r®   rj  s        r.   rO   znhypergeom_gen._pmfm  s   € ô �4—<‘<  1 a¨Ó+Ó,Ð,r1   c                 óª   — d|z  d|z  d|z  }}}||z  ||z
  dz   z  }||dz   z  |z  ||z
  dz   ||z
  dz   z  z  d|||z
  dz   z  z
  z  }d\  }}||||fS )Nr²   r   r³   rb   r�   )r-   r%  r$   rU  ri   rj   rk   rl   s           r.   rr   znhypergeom_gen._statsr  sŠ   € ð �Q‘$˜˜1™˜b ™dˆaˆ1ˆØˆq‰S�A�a‘C˜‘E‰]ˆà��1‘‰g�a‰i˜A˜a™C ™E A a¡C¨¡E™?Ñ+¨q°1¸¸!¹¸A¹±;©Ñ?ˆð ‰ˆˆBØ�3˜˜BˆÐr1   rb   )r}   r~   r   r€   r/   rA   r=   r8   rJ   rO   rr   r�   r1   r.   rS  rS  â  s.   „ ñbòHCò
òó
Dò ò-ó
r1   rS  Ú
nhypergeomc                   ó6   — e Zd ZdZd„ Zd	d„Zd„ Zd„ Zd„ Zd„ Z	y)
Ú
logser_genaÔ  A Logarithmic (Log-Series, Series) discrete random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `logser` is:

    .. math::

        f(k) = - \frac{p^k}{k \log(1-p)}

    for :math:`k \ge 1`, :math:`0 < p < 1`

    `logser` takes :math:`p` as shape parameter,
    where :math:`p` is the probability of a single success
    and :math:`1-p` is the probability of a single failure.

    %(after_notes)s

    %(example)s

    c                 ó    — t        dddd«      gS r‡   rˆ   r,   s    r.   r/   zlogser_gen._shape_info�  r‰   r1   Nc                 ó(   — |j                  ||¬«      S r)  )Ú	logseriesrŒ   s       r.   r8   zlogser_gen._rvs   s   € ð ×%Ñ% a¨dÐ%Ó3Ð3r1   c                 ó   — |dkD  |dk  z  S r:   r�   rŽ   s     r.   r=   zlogser_gen._argcheck¥  s   € Ø�A‘˜!˜a™%Ñ Ð r1   c                 ój   — t        j                  ||«       dz  |z  t        j                  | «      z  S rï   )r*   r  r   r   r  s      r.   rO   zlogser_gen._pmf¨  s.   € ä—‘˜˜A“ˆ Ñ$ qÑ(¬7¯=©=¸!¸Ó+<Ñ<Ð<r1   c                 óž   — d}t        j                  |dz   ||«       t        j                  |dz   |«      z  t        j                  | «      z  S )Ng0Žä.ÿ++r   )r   rË   r£   r*   r   )r-   rH   r&   Útinys       r.   rW   zlogser_gen._sf¬  sH   € Øˆô
 —‘  !¡ T¨1Ó-Ð-´·±¸Q¸q¹SÀ$Ó0GÑGÌ"Ï(É(ÐTUÐSUË,ÑVÐVr1   c                 ó¾  — t        j                  | «      }||dz
  z  |z  }| |z  |dz
  dz  z  }|||z  z
  }| |z  d|z   z  d|z
  dz  z  }|d|z  |z  z
  d|dz  z  z   }|t        j                  |d«      z  }| |z  d|dz
  dz  z  d|z  |dz
  dz  z  z
  d|z  |z  |dz
  dz  z  z   z  }	|	d|z  |z  z
  d|z  |z  |z  z   d|dz  z  z
  }
|
|dz  z  dz
  }||||fS )	Nr²   r³   rµ   ç      ø?r   r´   rÿ   rö   )r   r   r*   r  )r-   r&   rU  ri   Úmu2prj   Úmu3pÚmu3rk   Úmu4pÚmu4rl   s               r.   rr   zlogser_gen._stats´  s>  € Ü�M‰M˜1˜"ÓˆØ�!�c‘'‰]˜QÑˆØˆr�A‰v˜˜S™ 1™Ñ$ˆØ�R˜‘U‰lˆØˆr�A‰v˜˜Q™Ñ 3¨¡7¨Q¡,Ñ.ˆØ�Q�r‘T˜$‘YÑ  2 q¡5¡Ñ(ˆØ”2—8‘8˜C Ó%Ñ%ˆàˆr�A‰vØ�1�Q‘3˜‘(‰N˜Q˜q™S A¨¡E¨A¡:Ñ-Ñ-°°!±°A±¸¸1¹¸q¹Ñ0@Ñ@ñBˆà�Q�t‘V˜B‘YÑ  4¡¨¡¨2¡Ñ-°°"°a±%±Ñ7ˆØ�3˜‘6‰\˜CÑˆØ�3˜˜BˆÐr1   rb   )
r}   r~   r   r€   r/   r8   r=   rO   rW   rr   r�   r1   r.   ro  ro  „  s&   „ ñò0>ó4ò
!ò=òWór1   ro  ÚlogserzA logarithmicc                   óH   — e Zd ZdZd„ Zd„ Zdd„Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zy)Úpoisson_gena›  A Poisson discrete random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `poisson` is:

    .. math::

        f(k) = \exp(-\mu) \frac{\mu^k}{k!}

    for :math:`k \ge 0`.

    `poisson` takes :math:`\mu \geq 0` as shape parameter.
    When :math:`\mu = 0`, the ``pmf`` method
    returns ``1.0`` at quantile :math:`k = 0`.

    %(after_notes)s

    %(example)s

    c                 ó@   — t        dddt        j                  fd«      gS )Nri   Fr   r%   r)   r,   s    r.   r/   zpoisson_gen._shape_infoà  s   € Ü˜4 ¨¬B¯F©F¨°]ÓCÐDÐDr1   c                 ó   — |dk\  S r¦   r�   )r-   ri   s     r.   r=   zpoisson_gen._argcheckä  s   € Ø�Q‰wˆr1   Nc                 ó&   — |j                  ||«      S r3   ©Úpoisson)r-   ri   r6   r7   s       r.   r8   zpoisson_gen._rvsç  s   € Ø×#Ñ# B¨Ó-Ð-r1   c                 óV   — t        j                  ||«      t        |dz   «      z
  |z
  }|S rC   )r   rE   rD   )r-   rH   ri   ÚPks       r.   rJ   zpoisson_gen._logpmfê  s)   € Ü�]‰]˜1˜bÓ!¤E¨!¨a©%£LÑ0°2Ñ5ˆØˆ	r1   c                 ó8   — t        | j                  ||«      «      S r3   r®   )r-   rH   ri   s      r.   rO   zpoisson_gen._pmfî  s   € ä�4—<‘<  2Ó&Ó'Ð'r1   c                 óD   — t        |«      }t        j                  ||«      S r3   )r   r   Úpdtr©r-   rG   ri   rH   s       r.   rS   zpoisson_gen._cdfò  s   € Ü�!‹HˆÜ�|‰|˜A˜rÓ"Ð"r1   c                 óD   — t        |«      }t        j                  ||«      S r3   )r   r   Úpdtrcr‹  s       r.   rW   zpoisson_gen._sfö  s   € Ü�!‹HˆÜ�}‰}˜Q Ó#Ð#r1   c                 óÒ   — t        t        j                  ||«      «      }t        j                  |dz
  d«      }t        j
                  ||«      }t        j                  ||k\  ||«      S r  )r   r   Úpdtrikr*   r-  rŠ  r  )r-   r_   ri   rx   Úvals1r  s         r.   r`   zpoisson_gen._ppfú  sR   € Ü”G—N‘N 1 bÓ)Ó*ˆÜ—
‘
˜4 !™8 QÓ'ˆÜ�|‰|˜E 2Ó&ˆÜ�x‰x˜ ™	 5¨$Ó/Ð/r1   c                 óæ   — |}t        j                  |«      }|dkD  }t        j                  ||d„ t         j                  ¬«      }t        j                  ||d„ t         j                  ¬«      }||||fS )Nr   c                 ó   — t        d| z  «      S rï   r÷   ©rG   s    r.   rh  z$poisson_gen._stats.<locals>.<lambda>  s   € ¼¸SÀ¹U¼r1   rò   c                 ó   — d| z  S rï   r�   r“  s    r.   rh  z$poisson_gen._stats.<locals>.<lambda>  s   € ¸¸Aºr1   )r*   rJ  r  r  r+   )r-   ri   rj   ÚtmpÚ
mu_nonzerork   rl   s          r.   rr   zpoisson_gen._stats   s_   € ØˆÜ�j‰j˜‹nˆØ˜1‘Wˆ
Ü�_‰_˜Z¨Ñ.CÔPR×PVÑPVÔWˆÜ�_‰_˜Z¨©oÌ"Ï&É&ÔQˆØ�3˜˜BˆÐr1   rb   )r}   r~   r   r€   r/   r=   r8   rJ   rO   rS   rW   r`   rr   r�   r1   r.   r€  r€  Ç  s5   „ ñò0Eòó.òò(ò#ò$ò0ór1   r€  r…  z	A Poisson)rƒ   r!  c                   óN   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
dd
„Zd„ Zd„ Zy	)Ú
planck_gena  A Planck discrete exponential random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `planck` is:

    .. math::

        f(k) = (1-\exp(-\lambda)) \exp(-\lambda k)

    for :math:`k \ge 0` and :math:`\lambda > 0`.

    `planck` takes :math:`\lambda` as shape parameter. The Planck distribution
    can be written as a geometric distribution (`geom`) with
    :math:`p = 1 - \exp(-\lambda)` shifted by ``loc = -1``.

    %(after_notes)s

    See Also
    --------
    geom

    %(example)s

    c                 ó@   — t        dddt        j                  fd«      gS )NÚlambda_Fr   r    r)   r,   s    r.   r/   zplanck_gen._shape_info(  s   € Ü˜9 e¨a´·±¨[¸.ÓIÐJÐJr1   c                 ó   — |dkD  S r¦   r�   )r-   rš  s     r.   r=   zplanck_gen._argcheck+  s   € Ø˜‰{Ðr1   c                 ó<   — t        | «       t        | |z  «      z  S r3   )r   r   )r-   rH   rš  s      r.   rO   zplanck_gen._pmf.  s    € Ü�w�h“Ð¤ W H¨Q¡J£Ñ/Ð/r1   c                 ó>   — t        |«      }t        | |dz   z  «       S rC   )r   r   ©r-   rG   rš  rH   s       r.   rS   zplanck_gen._cdf1  s#   € Ü�!‹HˆÜ�w�h  !¡‘nÓ%Ð%Ð%r1   c                 ó8   — t        | j                  ||«      «      S r3   )r   r  )r-   rG   rš  s      r.   rW   zplanck_gen._sf5  s   € Ü�4—;‘;˜q 'Ó*Ó+Ð+r1   c                 ó*   — t        |«      }| |dz   z  S rC   ©r   rž  s       r.   r  zplanck_gen._logsf8  s   € Ü�!‹HˆØˆx˜˜1™‰~Ðr1   c                 óØ   — t        d|z  t        | «      z  dz
  «      } |dz
  j                  | j                  |«      Ž }| j	                  ||«      }t        j                  ||k\  ||«      S )Nç      ð¿r   )r   r   ÚcliprA   rS   r*   r  )r-   r_   rš  rx   r�  r  s         r.   r`   zplanck_gen._ppf<  sf   € Ü�D˜‘L¤5¨!¨£9Ñ,¨QÑ.Ó/ˆØ��a‘—‘ × 1Ñ 1°'Ó :Ð<ˆØ�y‰y˜ Ó(ˆÜ�x‰x˜ ™	 5¨$Ó/Ð/r1   Nc                 óH   — t        | «       }|j                  ||¬«      dz
  S )Nr  r²   )r   r	  )r-   rš  r6   r7   r&   s        r.   r8   zplanck_gen._rvsB  s+   € ä�G�8‹_ÐˆØ×%Ñ% a¨dÐ%Ó3°cÑ9Ð9r1   c                 ó¦   — dt        |«      z  }t        | «      t        | «      dz  z  }dt        |dz  «      z  }ddt        |«      z  z   }||||fS )Nr   r³   rd   rÿ   )r   r   r   )r-   rš  ri   rj   rk   rl   s         r.   rr   zplanck_gen._statsG  s^   € ØŒu�W‹~ÑˆÜ�7�(‹mœU G 8›_¨qÑ0Ñ0ˆØŒt�G˜C‘KÓ Ñ ˆØˆq”�g“‰ÑˆØ�3˜˜BˆÐr1   c                 óX   — t        | «       }|t        | «      z  |z  t        |«      z
  S r3   )r   r   r   )r-   rš  ÚCs      r.   ry   zplanck_gen._entropyN  s/   € Ü�G�8‹_ÐˆØ”s˜G˜8“}Ñ$ QÑ&¬¨Q«Ñ/Ð/r1   rb   )r}   r~   r   r€   r/   r=   rO   rS   rW   r  r`   r8   rr   ry   r�   r1   r.   r˜  r˜    s:   „ ñò6Kòò0ò&ò,òò0ó:ò
ó0r1   r˜  ÚplanckzA discrete exponential c                   ó:   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
y	)
Úboltzmann_gena—  A Boltzmann (Truncated Discrete Exponential) random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `boltzmann` is:

    .. math::

        f(k) = (1-\exp(-\lambda)) \exp(-\lambda k) / (1-\exp(-\lambda N))

    for :math:`k = 0,..., N-1`.

    `boltzmann` takes :math:`\lambda > 0` and :math:`N > 0` as shape parameters.

    %(after_notes)s

    %(example)s

    c                 óz   — t        dddt        j                  fd«      t        dddt        j                  fd«      gS )Nrš  Fr   r    r&  Tr)   r,   s    r.   r/   zboltzmann_gen._shape_infol  s:   € Ü˜9 e¨a´·±¨[¸.ÓIÜ˜3  q¬"¯&©& k°>ÓBðDð 	Dr1   c                 ó0   — |dkD  |dkD  z  t        |«      z  S r¦   r;   ©r-   rš  r&  s      r.   r=   zboltzmann_gen._argcheckp  s   € Ø˜!‘  A¡Ñ&¬°Q«Ñ7Ð7r1   c                 ó$   — | j                   |dz
  fS rC   r?   r®  s      r.   rA   zboltzmann_gen._get_supports  s   € Ø�v‰v�q˜1‘uˆ}Ðr1   c                 ój   — dt        | «      z
  dt        | |z  «      z
  z  }|t        | |z  «      z  S rC   ©r   )r-   rH   rš  r&  Úfacts        r.   rO   zboltzmann_gen._pmfv  s<   € ð ”#�w�h“-‘ !¤C¨¨°©
£OÑ"3Ñ4ˆØ”C˜˜ ™
“OÑ#Ð#r1   c                 óh   — t        |«      }dt        | |dz   z  «      z
  dt        | |z  «      z
  z  S rC   )r   r   )r-   rG   rš  r&  rH   s        r.   rS   zboltzmann_gen._cdf|  s9   € Ü�!‹HˆØ”#�w�h  !¡‘nÓ%Ñ%¨¬#¨w¨h°q©j«/Ñ(9Ñ:Ð:r1   c                 ó  — |dt        | |z  «      z
  z  }t        d|z  t        d|z
  «      z  dz
  «      }|dz
  j                  dt        j
                  «      }| j                  |||«      }t	        j                  ||k\  ||«      S )Nr   r£  ri  )r   r   r   r¤  r*   r+   rS   r  )r-   r_   rš  r&  Úqnewrx   r�  r  s           r.   r`   zboltzmann_gen._ppf€  s|   € Ø�!”C˜˜ ™
“OÑ#Ñ$ˆÜ�D˜‘L¤3 q¨¡v£;Ñ.¨qÑ0Ó1ˆØ�a‘—‘˜c¤2§6¡6Ó*ˆØ�y‰y˜ ¨Ó+ˆÜ�x‰x˜ ™	 5¨$Ó/Ð/r1   c                 ó–  — t        | «      }t        | |z  «      }|d|z
  z  ||z  d|z
  z  z
  }|d|z
  dz  z  ||z  |z  d|z
  dz  z  z
  }d|z
  d|z
  z  }||dz  z  ||z  |z  z
  }|d|z   z  |dz  z  |dz  |z  d|z   z  z
  }	|	|dz  z  }	|dd|z  z   ||z  z   z  |dz  z  |dz  |z  dd|z  z   ||z  z   z  z
  }
|
|z  |z  }
|||	|
fS )Nr²   r   r³   rµ   rx  rÿ   r±  )r-   rš  r&  ÚzÚzNri   rj   ÚtrmÚtrm2rk   rl   s              r.   rr   zboltzmann_gen._stats‡  s(  € Ü��‹MˆÜ�'�˜!‘‹_ˆØ��A‘‰Y�q˜‘t˜Q˜r™T‘{Ñ"ˆØ��Q‘˜‘
‰l˜Q˜q™S ™V Q r¡T¨A¡IÑ-Ñ-ˆØ�‰t�a˜‘c‰lˆØ�#�q‘&‘˜1˜Q™3˜r™6Ñ!ˆØ��!‘‰W�S˜!‘V‰^˜a ™d 2™g q¨¡t™nÑ,ˆØ�$˜‘+ÑˆØ��!�A‘#‘�a˜‘c‘	‰]˜3 ™6Ñ! A q¡D¨2¡I¨q°°2±©v°b¸±e©|Ñ$<Ñ<ˆØ�$‰Y˜ÑˆØ�3˜˜BˆÐr1   N)r}   r~   r   r€   r/   r=   rA   rO   rS   r`   rr   r�   r1   r.   r«  r«  V  s+   „ ñò*Dò8òò$ò;ò0ór1   r«  Ú	boltzmannz!A truncated discrete exponential )rƒ   r@   r!  c                   óH   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
dd
„Zd„ Zy	)Úrandint_genaÏ  A uniform discrete random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `randint` is:

    .. math::

        f(k) = \frac{1}{\texttt{high} - \texttt{low}}

    for :math:`k \in \{\texttt{low}, \dots, \texttt{high} - 1\}`.

    `randint` takes :math:`\texttt{low}` and :math:`\texttt{high}` as shape
    parameters.

    %(after_notes)s

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.stats import randint
    >>> import matplotlib.pyplot as plt
    >>> fig, ax = plt.subplots(1, 1)

    Calculate the first four moments:

    >>> low, high = 7, 31
    >>> mean, var, skew, kurt = randint.stats(low, high, moments='mvsk')

    Display the probability mass function (``pmf``):

    >>> x = np.arange(low - 5, high + 5)
    >>> ax.plot(x, randint.pmf(x, low, high), 'bo', ms=8, label='randint pmf')
    >>> ax.vlines(x, 0, randint.pmf(x, low, high), colors='b', lw=5, alpha=0.5)

    Alternatively, the distribution object can be called (as a function) to
    fix the shape and location. This returns a "frozen" RV object holding the
    given parameters fixed.

    Freeze the distribution and display the frozen ``pmf``:

    >>> rv = randint(low, high)
    >>> ax.vlines(x, 0, rv.pmf(x), colors='k', linestyles='-',
    ...           lw=1, label='frozen pmf')
    >>> ax.legend(loc='lower center')
    >>> plt.show()

    Check the relationship between the cumulative distribution function
    (``cdf``) and its inverse, the percent point function (``ppf``):

    >>> q = np.arange(low, high)
    >>> p = randint.cdf(q, low, high)
    >>> np.allclose(q, randint.ppf(p, low, high))
    True

    Generate random numbers:

    >>> r = randint.rvs(low, high, size=1000)

    c                 ó¶   — t        ddt        j                   t        j                  fd«      t        ddt        j                   t        j                  fd«      gS )NÚlowTr    Úhighr)   r,   s    r.   r/   zrandint_gen._shape_infoÙ  sH   € Ü˜5 $¬"¯&©&¨´"·&±&Ð(9¸>ÓJÜ˜6 4¬2¯6©6¨'´2·6±6Ð):¸NÓKðMð 	Mr1   c                 ó<   — ||kD  t        |«      z  t        |«      z  S r3   r;   ©r-   r¿  rÀ  s      r.   r=   zrandint_gen._argcheckÝ  s    € Ø�s‘
œk¨#Ó.Ñ.´¸TÓ1BÑBÐBr1   c                 ó   — ||dz
  fS rC   r�   rÂ  s      r.   rA   zrandint_gen._get_supportà  s   € Ø�D˜‘Fˆ{Ðr1   c                 ó¾   — t        j                  |«      t        j                  |t         j                  ¬«      |z
  z  }t        j                  ||k\  ||k  z  |d«      S )N©r¸   ri  )r*   Ú	ones_likerJ  Úint64r  )r-   rH   r¿  rÀ  r&   s        r.   rO   zrandint_gen._pmfã  sH   € ä�L‰L˜‹OœrŸz™z¨$´b·h±hÔ?À#ÑEÑFˆÜ�x‰x˜˜c™ a¨$¡hÑ/°°BÓ7Ð7r1   c                 ó4   — t        |«      }||z
  dz   ||z
  z  S rï   r¡  )r-   rG   r¿  rÀ  rH   s        r.   rS   zrandint_gen._cdfè  s"   € Ü�!‹HˆØ�C‘˜"‘ ¨¡Ñ,Ð,r1   c                 ó´   — t        |||z
  z  |z   «      dz
  }|dz
  j                  ||«      }| j                  |||«      }t        j                  ||k\  ||«      S rC   )r   r¤  rS   r*   r  )r-   r_   r¿  rÀ  rx   r�  r  s          r.   r`   zrandint_gen._ppfì  s\   € Ü�A˜ ™Ñ$ sÑ*Ó+¨aÑ/ˆØ˜‘—‘  TÓ*ˆØ�y‰y˜  TÓ*ˆÜ�x‰x˜ ™	 5¨$Ó/Ð/r1   c                 óÄ   — t        j                  |«      t        j                  |«      }}||z   dz
  dz  }||z
  }||z  dz
  dz  }d}d||z  dz   z  ||z  dz
  z  }	||||	fS )Nr²   r³   r   g      (@ri  g333333ó¿)r*   rJ  )
r-   r¿  rÀ  Úm2Úm1ri   Údrj   rk   rl   s
             r.   rr   zrandint_gen._statsò  s{   € Ü—‘˜DÓ!¤2§:¡:¨c£?ˆBˆØ�2‰g˜‰m˜qÑ ˆØ�‰GˆØ�‰s�Q‰w˜$ÑˆØˆØ˜˜1™˜s™Ñ# q¨¡s¨S¡yÑ1ˆØ�3˜˜BˆÐr1   Nc                 ó�  — t        j                  |«      j                  dk(  r1t        j                  |«      j                  dk(  rt        ||||¬«      S |�,t        j                  ||«      }t        j                  ||«      }t        j
                  t        t        |«      t        j                  t        «      g¬«      } |||«      S )z=An array of *size* random integers >= ``low`` and < ``high``.r   r  )Úotypes)	r*   rJ  r6   r	   Úbroadcast_toÚ	vectorizer   r¸   r_  )r-   r¿  rÀ  r6   r7   Úrandints         r.   r8   zrandint_gen._rvsû  s˜   € ä�:‰:�c‹?×Ñ 1Ò$¬¯©°DÓ)9×)>Ñ)>À!Ò)Cä ¨c°4¸dÔCÐCàÐô
 —/‘/ # tÓ,ˆCÜ—?‘? 4¨Ó.ˆDÜ—,‘,œw¤|°\ÓBÜ')§x¡x´£} oô7ˆá�s˜DÓ!Ð!r1   c                 ó   — t        ||z
  «      S r3   )r   rÂ  s      r.   ry   zrandint_gen._entropy  s   € Ü�4˜#‘:‹Ðr1   rb   )r}   r~   r   r€   r/   r=   rA   rO   rS   r`   rr   r8   ry   r�   r1   r.   r½  r½  ™  s7   „ ñ=ò~MòCòò8ò
-ò0òó"ó"r1   r½  rÒ  z#A discrete uniform (random integer)c                   ó0   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zy)	Úzipf_gena­  A Zipf (Zeta) discrete random variable.

    %(before_notes)s

    See Also
    --------
    zipfian

    Notes
    -----
    The probability mass function for `zipf` is:

    .. math::

        f(k, a) = \frac{1}{\zeta(a) k^a}

    for :math:`k \ge 1`, :math:`a > 1`.

    `zipf` takes :math:`a > 1` as shape parameter. :math:`\zeta` is the
    Riemann zeta function (`scipy.special.zeta`)

    The Zipf distribution is also known as the zeta distribution, which is
    a special case of the Zipfian distribution (`zipfian`).

    %(after_notes)s

    References
    ----------
    .. [1] "Zeta Distribution", Wikipedia,
           https://en.wikipedia.org/wiki/Zeta_distribution

    %(example)s

    Confirm that `zipf` is the large `n` limit of `zipfian`.

    >>> import numpy as np
    >>> from scipy.stats import zipf, zipfian
    >>> k = np.arange(11)
    >>> np.allclose(zipf.pmf(k, a), zipfian.pmf(k, a, n=10000000))
    True

    c                 ó@   — t        dddt        j                  fd«      gS )Nr@   Fr   r    r)   r,   s    r.   r/   zzipf_gen._shape_infoA  ó   € Ü˜3 ¨¬2¯6©6 {°NÓCÐDÐDr1   Nc                 ó(   — |j                  ||¬«      S r)  )Úzipf)r-   r@   r6   r7   s       r.   r8   zzipf_gen._rvsD  s   € Ø× Ñ  ¨Ð Ó.Ð.r1   c                 ó   — |dkD  S rC   r�   ©r-   r@   s     r.   r=   zzipf_gen._argcheckG  s   € Ø�1‰uˆr1   c                 ó„   — |j                  t        j                  «      }dt        j                  |d«      z  || z  z  }|S ©Nr²   r   )r·   r*   Úfloat64r   Úzeta)r-   rH   r@   r‡  s       r.   rO   zzipf_gen._pmfJ  s9   € Ø�H‰H”R—Z‘ZÓ ˆà”7—<‘<  1Ó%Ñ%¨¨A¨2©Ñ-ˆØˆ	r1   c                 ób   — t        j                  ||dz   kD  ||fd„ t        j                  ¬«      S )Nr   c                 ób   — t        j                  | |z
  d«      t        j                  | d«      z  S rC   )r   rß  )r@   r$   s     r.   rh  z zipf_gen._munp.<locals>.<lambda>S  s#   € œŸ™ a¨!¡e¨QÓ/´'·,±,¸qÀ!Ó2DÒDr1   rò   r   )r-   r$   r@   s      r.   Ú_munpzzipf_gen._munpP  s.   € Ü�‰Ø��A‘‰I˜˜1�vÙDÜ—v‘vôð 	r1   rb   )	r}   r~   r   r€   r/   r8   r=   rO   râ  r�   r1   r.   rÕ  rÕ    s"   „ ñ)òVEó/òòór1   rÕ  rÙ  zA Zipfc                   ó:   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
y	)
Úzipfian_gena`  A Zipfian discrete random variable.

    %(before_notes)s

    See Also
    --------
    zipf

    Notes
    -----
    The probability mass function for `zipfian` is:

    .. math::

        f(k, a, n) = \frac{1}{H_{n,a} k^a}

    for :math:`k \in \{1, 2, \dots, n-1, n\}`, :math:`a \ge 0`,
    :math:`n \in \{1, 2, 3, \dots\}`.

    `zipfian` takes :math:`a` and :math:`n` as shape parameters.
    :math:`H_{n,a}` is the :math:`n`:sup:`th` generalized harmonic
    number of order :math:`a`.

    The SciPy implementation of this distribution requires :math:`1 \le n \le 2^{53}`.
    For larger values of :math:`n`, the `zipfian` methods (`pmf`, `cdf`, `mean`, etc.)
    will return `nan`.

    When :math:`a > 1`, the Zipfian distribution reduces to the Zipf (zeta)
    distribution as :math:`n \rightarrow \infty`.

    %(after_notes)s

    References
    ----------
    .. [1] "Zipf's Law", Wikipedia, https://en.wikipedia.org/wiki/Zipf's_law
    .. [2] Larry Leemis, "Zipf Distribution", Univariate Distribution
           Relationships. http://www.math.wm.edu/~leemis/chart/UDR/PDFs/Zipf.pdf

    %(example)s

    Confirm that `zipfian` reduces to `zipf` for large `n`, ``a > 1``.

    >>> import numpy as np
    >>> from scipy.stats import zipf, zipfian
    >>> k = np.arange(11)
    >>> np.allclose(zipfian.pmf(k, a=3.5, n=10000000), zipf.pmf(k, a=3.5))
    True

    c                 óz   — t        dddt        j                  fd«      t        dddt        j                  fd«      gS )Nr@   Fr   r%   r$   Tr    r)   r,   s    r.   r/   zzipfian_gen._shape_info�  s:   € Ü˜3 ¨¬2¯6©6 {°MÓBÜ˜3  q¬"¯&©& k°>ÓBðDð 	Dr1   c           	      ó¤   — |dk\  |t        j                  t        j                  |dd«      «      j                  t         j                  ¬«      k(  z  S )Nr   r   l          rÅ  )r*   rJ  r¤  r·   rÇ  ©r-   r@   r$   s      r.   r=   zzipfian_gen._argcheck‘  sG   € ð �a‘Ø”b—j‘j¤§¡¨¨A¨uÓ!5Ó6×=Ñ=ÄBÇHÁHÐ=ÓMÑMñOð 	Pr1   c                 ó0   — dt        j                  |«      fS rC   )r*   r   rç  s      r.   rA   zzipfian_gen._get_support¡  s   € Ø”"—(‘(˜1“+ˆ~Ðr1   c                 ó†   — t        j                  |«      }t        j                  |«      }t        j                  ||||«      S r3   ©r*   r   rL   Ú_normalized_gen_harmonic©r-   rH   r@   r$   s       r.   rO   zzipfian_gen._pmf¤  ó3   € Ü�H‰H�Q‹KˆÜ�H‰H�Q‹KˆÜ×+Ñ+¨A¨q°!°QÓ7Ð7r1   c                 ó†   — t        j                  |«      }t        j                  |«      }t        j                  d|||«      S rC   rê  rì  s       r.   rS   zzipfian_gen._cdf©  rí  r1   c                 óŒ   — t        j                  |«      }t        j                  |«      }t        j                  |dz   |||«      S rC   rê  rì  s       r.   rW   zzipfian_gen._sf®  s7   € Ü�H‰H�Q‹KˆÜ�H‰H�Q‹KˆÜ×+Ñ+¨A°©E°1°a¸Ó;Ð;r1   c                 ó&  — t        j                  |«      }t        j                  ||«      }t        j                  ||dz
  «      }t        j                  ||dz
  «      }t        j                  ||dz
  «      }t        j                  ||dz
  «      }||z  }||z  |dz  z
  }	|dz  }
|	|
z  }||z  d|z  |z  |dz  z  z
  d|dz  z  |dz  z  z   |dz  z  }|dz  |z  d|dz  z  |z  |z  z
  d|z  |dz  z  |z  z   d|dz  z  z
  |	dz  z  }|dz  }||||fS )Nr   r³   rµ   rÿ   rx  r´   )r*   r   rL   Ú_gen_harmonic)r-   r@   r$   ÚHnaÚHna1ÚHna2ÚHna3ÚHna4Úmu1Úmu2nÚmu2dÚmu2rk   rl   s                 r.   rr   zzipfian_gen._stats³  sQ  € Ü�H‰H�Q‹Kˆä×Ñ  1Ó%ˆÜ× Ñ   A a¡CÓ(ˆÜ× Ñ   A a¡CÓ(ˆÜ× Ñ   A a¡CÓ(ˆÜ× Ñ   A a¡CÓ(ˆØ�3‰hˆØ�S‘˜4 ™7Ñ"ˆØ�A‰vˆØ�T‰kˆØ�3‰h˜˜4™ ™ S¨!¡VÑ+Ñ+¨a°°a±©i¸¸Q¹Ñ.>Ñ>ÀÀcÁ
ÑJˆØ�1‰f�T‰k˜A˜c 1™f™H T™M¨$Ñ.Ñ.°°3±°t¸Q±w±¸tÑ1CÑCØ�$˜‘'‘	ñØ! 1™Wñ%ˆà
ˆa‰ˆØ�C˜˜RÐÐr1   N)r}   r~   r   r€   r/   r=   rA   rO   rS   rW   rr   r�   r1   r.   rä  rä  Z  s-   „ ñ0òdDòPò ò8ò
8ò
<ó
 r1   rä  Úzipfianz	A Zipfianc                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d
d	„Z
y)Údlaplace_genaL  A  Laplacian discrete random variable.

    %(before_notes)s

    Notes
    -----
    The probability mass function for `dlaplace` is:

    .. math::

        f(k) = \tanh(a/2) \exp(-a |k|)

    for integers :math:`k` and :math:`a > 0`.

    `dlaplace` takes :math:`a` as shape parameter.

    %(after_notes)s

    %(example)s

    c                 ó@   — t        dddt        j                  fd«      gS )Nr@   Fr   r    r)   r,   s    r.   r/   zdlaplace_gen._shape_infoà  r×  r1   c                 óP   — t        |dz  «      t        | t        |«      z  «      z  S ©Nrd   )r   r   Úabs)r-   rH   r@   s      r.   rO   zdlaplace_gen._pmfã  s$   € ä�A�c‘E‹{œS ! ¤c¨!£f¡Ó-Ñ-Ð-r1   c                 ó^   — t        |«      }d„ }d„ }t        j                  |dk\  ||f||«      S )Nc                 óD   — dt        | | z  «      t        |«      dz   z  z
  S rÝ  r±  ©rH   r@   s     r.   rÌ   zdlaplace_gen._cdf.<locals>.f1ê  s$   € Øœ˜a˜R !™V›¬¨A«°©
Ñ3Ñ3Ð3r1   c                 óB   — t        || dz   z  «      t        |«      dz   z  S rC   r±  r  s     r.   Úf2zdlaplace_gen._cdf.<locals>.f2í  s"   € Ü�q˜A ™E‘{Ó#¤s¨1£v°¡zÑ2Ð2r1   r   )r   r  r  )r-   rG   r@   rH   rÌ   r  s         r.   rS   zdlaplace_gen._cdfç  s4   € Ü�!‹Hˆò	4ò	3ô �‰˜q A™v¨¨1 v¨r°2Ó6Ð6r1   c           
      ó,  — dt        |«      z   }t        t        j                  |ddt        | «      z   z  k  t	        ||z  «      |z  dz
  t	        d|z
  |z  «       |z  «      «      }|dz
  }t        j                  | j                  ||«      |k\  ||«      S )Nr   r²   )r   r   r*   r  r   rS   )r-   r_   r@   Úconstrx   r�  s         r.   r`   zdlaplace_gen._ppfò  s•   € Ø”C˜“F‘
ˆÜ”B—H‘H˜Q ¨¬C°°«G©Ñ!4Ñ4Ü   5¡›\¨AÑ-°Ñ1Ü! 1 Q¡3¨%¡-Ó0Ð0°1Ñ4ó6ó 7ˆð �q‘ˆÜ�x‰x˜Ÿ	™	 %¨Ó+¨qÑ0°%¸Ó>Ð>r1   c                 óŒ   — t        |«      }d|z  |dz
  dz  z  }d|z  |dz  d|z  z   dz   z  |dz
  dz  z  }d|d||dz  z  dz
  fS )Nrd   r²   r³   g      $@rÿ   ri  rö   r±  )r-   r@   Úearú  r}  s        r.   rr   zdlaplace_gen._statsú  sg   € Ü�‹VˆØ�‰e�R˜‘U˜Q‘JÑˆØ�‰e�R˜‘U˜3˜r™6‘\ "‘_Ñ%¨¨B©°©
Ñ2ˆØ�3˜˜C  Q¡™J¨™OÐ+Ð+r1   c                 óN   — |t        |«      z  t        t        |dz  «      «      z
  S r   )r   r   r   rÛ  s     r.   ry   zdlaplace_gen._entropy   s"   € Ø”4˜“7‰{œS¤ a¨¡e£Ó-Ñ-Ð-r1   Nc                 ó¬   — t        j                  t        j                  |«       «       }|j                  ||¬«      }|j                  ||¬«      }||z
  S r)  )r*   r   rJ  r	  )r-   r@   r6   r7   ÚprobOfSuccessrG   Úys          r.   r8   zdlaplace_gen._rvs  sR   € ô  Ÿ™¤2§:¡:¨a£= .Ó1Ð1ˆØ×"Ñ" =°tÐ"Ó<ˆØ×"Ñ" =°tÐ"Ó<ˆØ�1‰uˆr1   rb   )r}   r~   r   r€   r/   rO   rS   r`   rr   ry   r8   r�   r1   r.   rý  rý  É  s+   „ ñò,Eò.ò	7ò?ò,ò.ôr1   rý  ÚdlaplacezA discrete Laplacianc                   óH   — e Zd ZdZd„ Zd„ Zdddœd„Zd„ Zd„ Zd	„ Z	d
„ Z
d„ Zy)Úpoisson_binom_genul  A Poisson Binomial discrete random variable.

    %(before_notes)s

    See Also
    --------
    binom

    Notes
    -----
    The probability mass function for `poisson_binom` is:

    .. math::

     f(k; p_1, p_2, ..., p_n) = \sum_{A \in F_k} \prod_{i \in A} p_i \prod_{j \in A^C} 1 - p_j

    where :math:`k \in \{0, 1, \dots, n-1, n\}`, :math:`F_k` is the set of all
    subsets of :math:`k` integers that can be selected :math:`\{0, 1, \dots, n-1, n\}`,
    and :math:`A^C` is the complement of a set :math:`A`.

    `poisson_binom` accepts a single array argument ``p`` for shape parameters
    :math:`0 â‰¤ p_i â‰¤ 1`, where the last axis corresponds with the index :math:`i` and
    any others are for batch dimensions. Broadcasting behaves according to the usual
    rules except that the last axis of ``p`` is ignored. Instances of this class do
    not support serialization/unserialization.

    %(after_notes)s

    References
    ----------
    .. [1] "Poisson binomial distribution", Wikipedia,
           https://en.wikipedia.org/wiki/Poisson_binomial_distribution
    .. [2] Biscarri, William, Sihai Dave Zhao, and Robert J. Brunner. "A simple and
           fast method for computing the Poisson binomial distribution function".
           Computational Statistics & Data Analysis 122 (2018) 92-100.
           :doi:`10.1016/j.csda.2018.01.007`

    %(example)s

    c                 ó   — g S r3   r�   r,   s    r.   r/   zpoisson_binom_gen._shape_infoF  s	   € ð ˆ	r1   c                 ót   — t        j                  |d¬«      }d|k  |dk  z  }t        j                  |d¬«      S ©Nr   rt   r   )r*   ÚstackÚall)r-   Úargsr&   Úcondss       r.   r=   zpoisson_binom_gen._argcheckK  s5   € Ü�H‰H�T Ô"ˆØ�a‘˜A ™FÑ#ˆÜ�v‰v�e !Ô$Ð$r1   Nr‹   c                ó*  — t        j                  |d¬«      }|€|j                  n&t        j                  |«      r|dfnt	        |«      dz   }t        j
                  |j                  |«      }t        j                  |||¬«      j                  d¬«      S )Néÿÿÿÿrt   r   )r   r‹   )	r*   r  ÚshapeÚisscalarÚtupleÚbroadcast_shapesr›   r8   rw   )r-   r6   r7   r  r&   s        r.   r8   zpoisson_binom_gen._rvsP  s{   € ä�H‰H�T Ô#ˆð  ˜<�—’ÜŸ[™[¨Ô.��q‘	´E¸$³KÀ$Ñ4Fð 	ä×"Ñ" 1§7¡7¨DÓ1ˆÜ�~‰~˜a d¸ˆ~ÓF×JÑJÐPRÐJÓSÐSr1   c                 ó   — dt        |«      fS r¦   )Úlen)r-   r  s     r.   rA   zpoisson_binom_gen._get_supportZ  s   € Ø”#�d“)ˆ|Ðr1   c                 óú   — t        j                  |«      j                  t         j                  «      }t        j                  |g|¢­Ž ^}}t        j
                  |t         j                  ¬«      }t        ||d«      S )NrÅ  rC  ©r*   Ú
atleast_1dr·   rÇ  rÏ   rJ  rÞ  r   ©r-   rH   r  s      r.   rO   zpoisson_binom_gen._pmf]  ó[   € Ü�M‰M˜!Ó×#Ñ#¤B§H¡HÓ-ˆÜ×&Ñ& qÐ0¨4Ò0ˆˆˆDÜ�z‰z˜$¤b§j¡jÔ1ˆÜ˜a  uÓ-Ð-r1   c                 óú   — t        j                  |«      j                  t         j                  «      }t        j                  |g|¢­Ž ^}}t        j
                  |t         j                  ¬«      }t        ||d«      S )NrÅ  rÑ   r"  r$  s      r.   rS   zpoisson_binom_gen._cdfc  r%  r1   c                 ó¤   — t        j                  |d¬«      }t        j                  |d¬«      }t        j                  |d|z
  z  d¬«      }||d d fS r  )r*   r  rw   )r-   r  Úkwdsr&   rñ   rj   s         r.   rr   zpoisson_binom_gen._statsi  sI   € Ü�H‰H�T Ô"ˆÜ�v‰v�a˜aÔ ˆÜ�f‰f�Q˜!˜A™#‘Y QÔ'ˆØ�c˜4 Ð&Ð&r1   c                 ó    — t        | g|¢­i |¤ŽS r3   )Úpoisson_binomial_frozen)r-   r  r(  s      r.   Ú__call__zpoisson_binom_gen.__call__o  s   € Ü& tÐ;¨dÒ;°dÑ;Ð;r1   )r}   r~   r   r€   r/   r=   r8   rA   rO   rS   rr   r+  r�   r1   r.   r  r    s8   „ ñ'òPò
%ð
  $°$ô Tòò.ò.ò'ó<r1   r  Úpoisson_binomzA Poisson binomialr&   )rƒ   r!  Úshapesc                 óJ   — t        t        j                  |dd«      «      |d|fS ©Nr  r   r²   ©r  r*   Úmoveaxis)r-   r&   Úlocr6   s       r.   Ú_parse_args_rvsr3  {  s#   € Ü”—‘˜Q  AÓ&Ó'¨¨c°4Ð7Ð7r1   c                 óJ   — t        t        j                  |dd«      «      |d|fS r/  r0  )r-   r&   r2  rh   s       r.   Ú_parse_args_statsr5  ~  s#   € Ü”—‘˜Q  AÓ&Ó'¨¨c°7Ð:Ð:r1   c                 óH   — t        t        j                  |dd«      «      |dfS r/  r0  )r-   r&   r2  s      r.   Ú_parse_argsr7  �  s!   € Ü”—‘˜Q  AÓ&Ó'¨¨cÐ1Ð1r1   c                   ó   — e Zd Zd„ Zdd„Zy)r*  c                 ó  — || _         || _         |j                  di |j                  «       ¤Ž| _        t
        j                  t        t        «      | j                  _        t        j                  t        t        «      | j                  _	        t        j                  t        t        «      | j                  _
         | j                  j                  |i |¤Ž\  }}} | j                  j                  |Ž \  | _        | _        y )Nr�   )r  r(  Ú	__class__Ú_updated_ctor_paramÚdistr3  Ú__get__Ú_pb_objÚ_pb_clsr5  r7  rA   r@   r�   )r-   r<  r  r(  r-  Ú_s         r.   Ú__init__z poisson_binomial_frozen.__init__�  s¼   € ØˆŒ	ØˆŒ	ð #�D—N‘NÑ@ T×%=Ñ%=Ó%?Ñ@ˆŒ	ô %4×$;Ñ$;¼GÄWÓ$Mˆ�	‰	Ô!Ü&7×&?Ñ&?ÄÌÓ&Qˆ�	‰	Ô#Ü +× 3Ñ 3´G¼WÓ Eˆ�	‰	Ôà,�t—y‘y×,Ñ,¨dÐ;°dÑ;‰ˆ��1Ø/˜Ÿ™×/Ñ/°Ð8‰ˆŒ�•r1   Nc                 óÂ   —  | j                   j                  | j                  i | j                  ¤Ž\  }}} | j                   j                  || j                  ||||fi |¤ŽS r3   )r<  r7  r  r(  Úexpect)	r-   ÚfuncÚlbÚubÚconditionalr(  r@   r2  Úscales	            r.   rC  zpoisson_binomial_frozen.expectœ  sW   € Ø-˜Ÿ	™	×-Ñ-¨t¯y©yÐF¸D¿I¹IÑF‰ˆˆ3�ð  ˆt�y‰y×Ñ  d§i¡i°°b¸"¸kÑRÈTÑRÐRr1   )NNNF)r}   r~   r   rA  rC  r�   r1   r.   r*  r*  ‹  s   „ ò9ôSr1   r*  c                   ó0   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zy)	Úskellam_genaÍ  A  Skellam discrete random variable.

    %(before_notes)s

    Notes
    -----
    Probability distribution of the difference of two correlated or
    uncorrelated Poisson random variables.

    Let :math:`k_1` and :math:`k_2` be two Poisson-distributed r.v. with
    expected values :math:`\lambda_1` and :math:`\lambda_2`. Then,
    :math:`k_1 - k_2` follows a Skellam distribution with parameters
    :math:`\mu_1 = \lambda_1 - \rho \sqrt{\lambda_1 \lambda_2}` and
    :math:`\mu_2 = \lambda_2 - \rho \sqrt{\lambda_1 \lambda_2}`, where
    :math:`\rho` is the correlation coefficient between :math:`k_1` and
    :math:`k_2`. If the two Poisson-distributed r.v. are independent then
    :math:`\rho = 0`.

    Parameters :math:`\mu_1` and :math:`\mu_2` must be strictly positive.

    For details see: https://en.wikipedia.org/wiki/Skellam_distribution

    `skellam` takes :math:`\mu_1` and :math:`\mu_2` as shape parameters.

    %(after_notes)s

    %(example)s

    c                 óz   — t        dddt        j                  fd«      t        dddt        j                  fd«      gS )Nr÷  Fr   r    rú  r)   r,   s    r.   r/   zskellam_gen._shape_infoÁ  s:   € Ü˜5 %¨!¬R¯V©V¨°nÓEÜ˜5 %¨!¬R¯V©V¨°nÓEðGð 	Gr1   Nc                 óP   — |}|j                  ||«      |j                  ||«      z
  S r3   r„  )r-   r÷  rú  r6   r7   r$   s         r.   r8   zskellam_gen._rvsÅ  s1   € ØˆØ×$Ñ$ S¨!Ó,Ø×$Ñ$ S¨!Ó,ñ-ð 	.r1   c                 ó"  — t        j                  d¬«      5  t        j                  |dk  t        j                  d|z  dd|z
  z  d|z  «      dz  t        j                  d|z  dd|z   z  d|z  «      dz  «      }d d d «       |S # 1 sw Y   S xY w)NrÍ   rÙ   r   r³   r   )r*   rÐ   r  rL   Ú	_ncx2_pdf©r-   rG   r÷  rú  Úpxs        r.   rO   zskellam_gen._pmfÊ  s†   € Ü�[‰[˜hÖ'Ü—‘˜!˜a™%ÜŸ-™-¨¨#©¨q°!°A±#©w¸¸#¹Ó>¸qÑ@ÜŸ-™-¨¨#©¨q°!°A±#©w¸¸#¹Ó>¸qÑ@óBˆB÷ (ð
 ˆ	÷ (ð
 ˆ	ús   —A#BÂBc                 ó&  — t        |«      }t        j                  d¬«      5  t        j                  |dk  t	        j
                  d|z  d|z  d|z  «      t        j                  d|z  d|dz   z  d|z  «      «      }d d d «       |S # 1 sw Y   S xY w)NrÍ   rÙ   r   r³   éþÿÿÿr   )r   r*   rÐ   r  r   ÚchndtrrL   Ú_ncx2_sfrO  s        r.   rS   zskellam_gen._cdfÒ  s€   € Ü�!‹HˆÜ�[‰[˜hÖ'Ü—‘˜!˜a™%Ü!Ÿ.™.¨¨3©°°1±°a¸±eÓ<ÜŸ,™, q¨¡u¨a°°1±©g°q¸±uÓ=ó?ˆB÷ (ð ˆ	÷	 (ð ˆ	ús   ¢ABÂBc                 óN   — ||z
  }||z   }|t        |dz  «      z  }d|z  }||||fS )Nrµ   r   r÷   )r-   r÷  rú  rñ   rj   rk   rl   s          r.   rr   zskellam_gen._statsÚ  s>   € Ø�S‰yˆØ�C‰iˆØ”D˜# ™“NÑ"ˆØ�‰WˆØ�S˜"˜bÐ Ð r1   rb   )	r}   r~   r   r€   r/   r8   rO   rS   rr   r�   r1   r.   rJ  rJ  £  s!   „ ñò:Gó.ò
òó!r1   rJ  Úskellamz	A Skellamc                   óH   — e Zd ZdZd„ Zdd„Zd„ Zd„ Zd„ Zd„ Z	d	„ Z
d
„ Zd„ Zy)Úyulesimon_genaî  A Yule-Simon discrete random variable.

    %(before_notes)s

    Notes
    -----

    The probability mass function for the `yulesimon` is:

    .. math::

        f(k) =  \alpha B(k, \alpha+1)

    for :math:`k=1,2,3,...`, where :math:`\alpha>0`.
    Here :math:`B` refers to the `scipy.special.beta` function.

    The sampling of random variates is based on pg 553, Section 6.3 of [1]_.
    Our notation maps to the referenced logic via :math:`\alpha=a-1`.

    For details see the wikipedia entry [2]_.

    References
    ----------
    .. [1] Devroye, Luc. "Non-uniform Random Variate Generation",
         (1986) Springer, New York.

    .. [2] https://en.wikipedia.org/wiki/Yule-Simon_distribution

    %(after_notes)s

    %(example)s

    c                 ó@   — t        dddt        j                  fd«      gS )NÚalphaFr   r    r)   r,   s    r.   r/   zyulesimon_gen._shape_info  s   € Ü˜7 E¨A¬r¯v©v¨;¸ÓGÐHÐHr1   Nc           	      ó–   — |j                  |«      }|j                  |«      }t        | t        t        | |z  «       «      z  «      }|S r3   )Ústandard_exponentialr   r   r   )r-   rZ  r6   r7   ÚE1ÚE2Úanss          r.   r8   zyulesimon_gen._rvs
  sK   € Ø×.Ñ.¨tÓ4ˆØ×.Ñ.¨tÓ4ˆÜ�B�3œ¤ R C¨%¡KÓ 0Ð0Ó1Ñ1Ó2ˆØˆ
r1   c                 ó:   — |t        j                  ||dz   «      z  S rC   ©r   r£   ©r-   rG   rZ  s      r.   rO   zyulesimon_gen._pmf  s   € Ø”w—|‘| A u¨q¡yÓ1Ñ1Ð1r1   c                 ó   — |dkD  S r¦   r�   )r-   rZ  s     r.   r=   zyulesimon_gen._argcheck  s   € Ø˜‘	Ðr1   c                 óL   — t        |«      t        j                  ||dz   «      z   S rC   ©r   r   r   rb  s      r.   rJ   zyulesimon_gen._logpmf  s    € Ü�5‹zœGŸN™N¨1¨e°a©iÓ8Ñ8Ð8r1   c                 ó@   — d|t        j                  ||dz   «      z  z
  S rC   ra  rb  s      r.   rS   zyulesimon_gen._cdf  s!   € Ø�1”w—|‘| A u¨q¡yÓ1Ñ1Ñ1Ð1r1   c                 ó:   — |t        j                  ||dz   «      z  S rC   ra  rb  s      r.   rW   zyulesimon_gen._sf  s   € Ø”7—<‘<  5¨1¡9Ó-Ñ-Ð-r1   c                 óL   — t        |«      t        j                  ||dz   «      z   S rC   re  rb  s      r.   r  zyulesimon_gen._logsf  s    € Ü�1‹vœŸ™ q¨%°!©)Ó4Ñ4Ð4r1   c                 óò  — t        j                  |dk  t         j                  ||dz
  z  «      }t        j                  |dkD  |dz  |dz
  |dz
  dz  z  z  t         j                  «      }t        j                  |dk  t         j                  |«      }t        j                  |dkD  t	        |dz
  «      |dz   dz  z  ||dz
  z  z  t         j                  «      }t        j                  |dk  t         j                  |«      }t        j                  |dkD  |dz   d|dz  z  d|z  z
  dz
  ||dz
  z  |dz
  z  z  z   t         j                  «      }t        j                  |dk  t         j                  |«      }||||fS )	Nr   r³   rd   rµ   rÿ   é   é1   é   )r*   r  r+   Únanr   )r-   rZ  ri   rú  rk   rl   s         r.   rr   zyulesimon_gen._stats"  s[  € Ü�X‰X�e˜q‘j¤"§&¡&¨%°5¸1±9Ñ*=Ó>ˆÜ�h‰h�u˜q‘yØ˜a‘x E¨C¡K°E¸A±IÀ±>Ñ#AÑBÜ—v‘vóˆô �h‰h�u ‘z¤2§6¡6¨3Ó/ˆÜ�X‰X�e˜a‘iÜ˜5 1™9“o¨°©°Q©Ñ6¸%À5È1Á9Ñ:MÑNÜ—f‘fóˆô �X‰X�e˜q‘j¤"§&¡&¨"Ó-ˆÜ�X‰X�e˜a‘iØ˜a‘i B¨°©¡M°B¸±JÑ$>ÀÑ$CØ$)¨U°Q©YÑ$7¸5À1¹9Ñ$Eñ$Gñ Hä—f‘fóˆô �X‰X�e˜q‘j¤"§&¡&¨"Ó-ˆØ�3˜˜BˆÐr1   rb   )r}   r~   r   r€   r/   r8   rO   r=   rJ   rS   rW   r  rr   r�   r1   r.   rX  rX  å  s6   „ ñ òBIóò2òò9ò2ò.ò5ór1   rX  Ú	yulesimon)rƒ   r@   c                   ó@   — e Zd ZdZdZdZd„ Zd„ Zd„ Zd	d„Z	d„ Z
d
d„Zy)Ú_nchypergeom_genz‰A noncentral hypergeometric discrete random variable.

    For subclassing by nchypergeom_fisher_gen and nchypergeom_wallenius_gen.

    Nc           	      óî   — t        dddt        j                  fd«      t        dddt        j                  fd«      t        dddt        j                  fd«      t        dddt        j                  fd	«      gS )
Nr%  Tr   r%   r$   r&  ÚoddsFr    r)   r,   s    r.   r/   z_nchypergeom_gen._shape_infoA  sf   € Ü˜3  q¬"¯&©& k°=ÓAÜ˜3  q¬"¯&©& k°=ÓAÜ˜3  q¬"¯&©& k°=ÓAÜ˜6 5¨1¬b¯f©f¨+°~ÓFðHð 	Hr1   c                 ó~   — |||}}}||z
  }t        j                  d||z
  «      }t        j                  ||«      }||fS r¦   r,  )	r-   r%  r$   r&  rr  rÌ  rË  Úx_minÚx_maxs	            r.   rA   z_nchypergeom_gen._get_supportG  sF   € Ø�a˜ˆqˆ2ˆØ�‰VˆÜ—
‘
˜1˜a "™fÓ%ˆÜ—
‘
˜1˜bÓ!ˆØ�eˆ|Ðr1   c                 ó(  — t        j                  |«      t        j                  |«      }}t        j                  |«      t        j                  |«      }}t        j                  |«       |j                  t        «      |k(  z  |dk\  z  }t        j                  |«       |j                  t        «      |k(  z  |dk\  z  }t        j                  |«       |j                  t        «      |k(  z  |dk\  z  }|dkD  }||k  }	||k  }
||z  |z  |z  |	z  |
z  S r¦   )r*   rJ  Úisnanr·   r_  )r-   r%  r$   r&  rr  Úcond1Úcond2Úcond3Úcond4Úcond5Úcond6s              r.   r=   z_nchypergeom_gen._argcheckN  sì   € Ü�z‰z˜!‹}œbŸj™j¨›mˆ1ˆÜ—*‘*˜Q“-¤§¡¨DÓ!1ˆ4ˆÜ—(‘(˜1“+� !§(¡(¬3£-°1Ñ"4Ñ5¸¸a¹Ñ@ˆÜ—(‘(˜1“+� !§(¡(¬3£-°1Ñ"4Ñ5¸¸a¹Ñ@ˆÜ—(‘(˜1“+� !§(¡(¬3£-°1Ñ"4Ñ5¸¸a¹Ñ@ˆØ�q‘ˆØ�Q‘ˆØ�Q‘ˆØ�u‰}˜uÑ$ uÑ,¨uÑ4°uÑ<Ð<r1   c                 ó<   ‡ — t         ˆ fd„«       } |||||||¬«      S )Nc                 óx  •— t        j                  | «      t        j                  |«      z  t        j                  |«      z  r$t        j                  |t         j                  «      S t        j                  |«      }t        «       }t        |‰
j                  «      } |||| |||«      }	|	j                  |«      }	|	S r3   )	r*   rw  Úfullrm  Úprodr   ÚgetattrÚrvs_nameÚreshape)r%  r$   r&  rr  r6   r7   ÚlengthÚurnÚrv_genrc  r-   s             €r.   rd  z$_nchypergeom_gen._rvs.<locals>._rvs1[  s‰   ø€ ä�x‰x˜‹{œRŸX™X a›[Ñ(¬2¯8©8°A«;Ò6Ü—w‘w˜t¤R§V¡VÓ,Ð,Ü—W‘W˜T“]ˆFÜ#Ó%ˆCÜ˜S $§-¡-Ó0ˆFÙ˜˜A˜q $¨°Ó=ˆCØ—+‘+˜dÓ#ˆCØˆJr1   r‹   re  )r-   r%  r$   r&  rr  r6   r7   rd  s   `       r.   r8   z_nchypergeom_gen._rvsY  s,   ø€ ä	#ó	ó 
$ð	ñ �Q˜˜1˜d¨¸LÔIÐIr1   c                 óÒ   ‡ — t        j                  |||||«      \  }}}}}|j                  dk(  rt        j                  |«      S t         j                  ˆ fd„«       } ||||||«      S )Nr   c                 ó  •— t        j                  | «      t        j                  |«      z  t        j                  |«      z  t        j                  |«      z  rt         j                  S ‰j                  ||||d«      }|j	                  | «      S ©Ngê-�™—q=)r*   rw  rm  r<  Úprobability)rG   r%  r$   r&  rr  r†  r-   s         €r.   Ú_pmf1z$_nchypergeom_gen._pmf.<locals>._pmf1n  sc   ø€ ä�x‰x˜‹{œRŸX™X a›[Ñ(¬2¯8©8°A«;Ñ6¼¿¹À!»ÒDÜ—v‘v�Ø—)‘)˜A˜q ! T¨5Ó1ˆCØ—?‘? 1Ó%Ð%r1   )r*   rÏ   r6   Ú
empty_likerÑ  )r-   rG   r%  r$   r&  rr  rŒ  s   `      r.   rO   z_nchypergeom_gen._pmfh  sk   ø€ ä×.Ñ.¨q°!°Q¸¸4Ó@Ñˆˆ1ˆa��DØ�6‰6�QŠ;Ü—=‘= Ó#Ð#ä	�‰ó	&ó 
ð	&ñ �Q˜˜1˜a Ó&Ð&r1   c                 óz   ‡ — t         j                  ˆ fd„«       }d|v sd|v r |||||«      nd\  }}d\  }	}
|||	|
fS )Nc                 ó  •— t        j                  | «      t        j                  |«      z  t        j                  |«      z  r t         j                  t         j                  fS ‰j                  ||| |d«      }|j	                  «       S rŠ  )r*   rw  rm  r<  rh   )r%  r$   r&  rr  r†  r-   s        €r.   Ú	_moments1z*_nchypergeom_gen._stats.<locals>._moments1y  s\   ø€ ä�x‰x˜‹{œRŸX™X a›[Ñ(¬2¯8©8°A«;Ò6Ü—v‘vœrŸv™v�~Ð%Ø—)‘)˜A˜q ! T¨5Ó1ˆCØ—;‘;“=Ð r1   r@  Úvrb   )r*   rÑ  )r-   r%  r$   r&  rr  rh   r�  r@  r‘  rc   rH   s   `          r.   rr   z_nchypergeom_gen._statsw  sX   ø€ ä	�‰ó	!ó 
ð	!ð .1°G©^¸sÀg¹~‘	˜!˜Q  4Ô(Ø!ñ 	ˆˆ1à‰ˆˆ1Ø�!�Q˜ˆzÐr1   rb   rz   )r}   r~   r   r€   rƒ  r<  r/   rA   r=   r8   rO   rr   r�   r1   r.   rp  rp  7  s3   „ ñð €HØ€DòHòò	=óJò'ôr1   rp  c                   ó   — e Zd ZdZdZeZy)Únchypergeom_fisher_genag	  A Fisher's noncentral hypergeometric discrete random variable.

    Fisher's noncentral hypergeometric distribution models drawing objects of
    two types from a bin. `M` is the total number of objects, `n` is the
    number of Type I objects, and `odds` is the odds ratio: the odds of
    selecting a Type I object rather than a Type II object when there is only
    one object of each type.
    The random variate represents the number of Type I objects drawn if we
    take a handful of objects from the bin at once and find out afterwards
    that we took `N` objects.

    %(before_notes)s

    See Also
    --------
    nchypergeom_wallenius, hypergeom, nhypergeom

    Notes
    -----
    Let mathematical symbols :math:`N`, :math:`n`, and :math:`M` correspond
    with parameters `N`, `n`, and `M` (respectively) as defined above.

    The probability mass function is defined as

    .. math::

        p(x; M, n, N, \omega) =
        \frac{\binom{n}{x}\binom{M - n}{N-x}\omega^x}{P_0},

    for
    :math:`x \in [x_l, x_u]`,
    :math:`M \in {\mathbb N}`,
    :math:`n \in [0, M]`,
    :math:`N \in [0, M]`,
    :math:`\omega > 0`,
    where
    :math:`x_l = \max(0, N - (M - n))`,
    :math:`x_u = \min(N, n)`,

    .. math::

        P_0 = \sum_{y=x_l}^{x_u} \binom{n}{y}\binom{M - n}{N-y}\omega^y,

    and the binomial coefficients are defined as

    .. math:: \binom{n}{k} \equiv \frac{n!}{k! (n - k)!}.

    `nchypergeom_fisher` uses the BiasedUrn package by Agner Fog with
    permission for it to be distributed under SciPy's license.

    The symbols used to denote the shape parameters (`N`, `n`, and `M`) are not
    universally accepted; they are chosen for consistency with `hypergeom`.

    Note that Fisher's noncentral hypergeometric distribution is distinct
    from Wallenius' noncentral hypergeometric distribution, which models
    drawing a pre-determined `N` objects from a bin one by one.
    When the odds ratio is unity, however, both distributions reduce to the
    ordinary hypergeometric distribution.

    %(after_notes)s

    References
    ----------
    .. [1] Agner Fog, "Biased Urn Theory".
           https://cran.r-project.org/web/packages/BiasedUrn/vignettes/UrnTheory.pdf

    .. [2] "Fisher's noncentral hypergeometric distribution", Wikipedia,
           https://en.wikipedia.org/wiki/Fisher's_noncentral_hypergeometric_distribution

    %(example)s

    Ú
rvs_fisherN)r}   r~   r   r€   rƒ  r   r<  r�   r1   r.   r“  r“  †  s   „ ñGðR €HØ%�Dr1   r“  Únchypergeom_fisherz$A Fisher's noncentral hypergeometricc                   ó   — e Zd ZdZdZeZy)Únchypergeom_wallenius_gena}	  A Wallenius' noncentral hypergeometric discrete random variable.

    Wallenius' noncentral hypergeometric distribution models drawing objects of
    two types from a bin. `M` is the total number of objects, `n` is the
    number of Type I objects, and `odds` is the odds ratio: the odds of
    selecting a Type I object rather than a Type II object when there is only
    one object of each type.
    The random variate represents the number of Type I objects drawn if we
    draw a pre-determined `N` objects from a bin one by one.

    %(before_notes)s

    See Also
    --------
    nchypergeom_fisher, hypergeom, nhypergeom

    Notes
    -----
    Let mathematical symbols :math:`N`, :math:`n`, and :math:`M` correspond
    with parameters `N`, `n`, and `M` (respectively) as defined above.

    The probability mass function is defined as

    .. math::

        p(x; N, n, M) = \binom{n}{x} \binom{M - n}{N-x}
        \int_0^1 \left(1-t^{\omega/D}\right)^x\left(1-t^{1/D}\right)^{N-x} dt

    for
    :math:`x \in [x_l, x_u]`,
    :math:`M \in {\mathbb N}`,
    :math:`n \in [0, M]`,
    :math:`N \in [0, M]`,
    :math:`\omega > 0`,
    where
    :math:`x_l = \max(0, N - (M - n))`,
    :math:`x_u = \min(N, n)`,

    .. math::

        D = \omega(n - x) + ((M - n)-(N-x)),

    and the binomial coefficients are defined as

    .. math:: \binom{n}{k} \equiv \frac{n!}{k! (n - k)!}.

    `nchypergeom_wallenius` uses the BiasedUrn package by Agner Fog with
    permission for it to be distributed under SciPy's license.

    The symbols used to denote the shape parameters (`N`, `n`, and `M`) are not
    universally accepted; they are chosen for consistency with `hypergeom`.

    Note that Wallenius' noncentral hypergeometric distribution is distinct
    from Fisher's noncentral hypergeometric distribution, which models
    take a handful of objects from the bin at once, finding out afterwards
    that `N` objects were taken.
    When the odds ratio is unity, however, both distributions reduce to the
    ordinary hypergeometric distribution.

    %(after_notes)s

    References
    ----------
    .. [1] Agner Fog, "Biased Urn Theory".
           https://cran.r-project.org/web/packages/BiasedUrn/vignettes/UrnTheory.pdf

    .. [2] "Wallenius' noncentral hypergeometric distribution", Wikipedia,
           https://en.wikipedia.org/wiki/Wallenius'_noncentral_hypergeometric_distribution

    %(example)s

    Úrvs_walleniusN)r}   r~   r   r€   rƒ  r   r<  r�   r1   r.   r—  r—  Ù  s   „ ñGðR €HØ'�Dr1   r—  Únchypergeom_walleniusz&A Wallenius' noncentral hypergeometric)r   N)r   r{   )r   )iÚ	functoolsr   Úscipyr   Úscipy.specialr   r   r   r   rD   Úscipy.special._ufuncsÚ_ufuncsrL   Úscipy._lib._utilr	   Úscipy._lib.array_api_extraÚ_libÚarray_api_extrar  Úscipy.interpolater
   Únumpyr   r   r   r   r   r   r   r   r   r   r*   Ú_distn_infrastructurer   r   r   r   r   r   Ú
_biasedurnr   r   r   Ú_stats_pythranr   r!   r‚   r…   r›   r�   r»   r½   rå   rç   r  r  r   r#  rQ  rS  rm  ro  r~  r€  r…  r˜  r©  r«  r»  r½  rÒ  rÕ  rÙ  rä  rû  rý  r+   r  r  r,  r3  r5  r7  r>  r?  r=  r*  rJ  rV  rX  rn  rp  r“  r•  r—  r™  ÚlistÚglobalsÚcopyÚitemsÚpairsÚ_distn_namesÚ_distn_gen_namesÚ__all__r�   r1   r.   Ú<module>r°     s†  ðõ
 å ß CÓ Cß #Ð #Ý )ß (Ð (Ý &ç M× M× Mã ÷8÷ 8÷,ñ ,õ +ô]*�ô ]*ñ@ 	�wÔ€ô>#�Iô >#ñB ˜A KÔ0€	ôO�Kô Oñd ˜{Ô+€	ôr
�ô r
ñj 
˜Ô	"€ôZ�[ô Zñz  Ô.€
ôN7ˆ{ô N7ñb �!˜&¨=Ô9€ôX�Kô Xñv ˜{Ô+€	ô[�[ô [ñ|  Ô.€
ô=�ô =ñ@ 
�a˜h°Ô	A€ô?�+ô ?ñD ˜9¨{Ô
;€ôD0�ô D0ñN 
�a˜hÐ1JÔ	K€ô<�Kô <ñ~ ˜{¨aØ#FôH€	ôt�+ô tñn ˜9ð 0)ô *€ô
?ˆ{ô ?ñD �!˜&¨8Ô4€ôi �+ô i ñX ˜ 	°KÔ
@€ôM�;ô Mñ` ˜2Ÿ6™6˜'Ø'Ð2HôJ€ôS<˜ô S<ñl " ÐAUØ),ô.€ó8ó;ó2ð
 !Ð"3Ð €ˆØ /× 7Ñ 7¸ÀÓ I€Ô Ø"3×";Ñ";¸GÀWÓ"M€Ô Ø'×/Ñ/°¸ÓA€Ô ôSÐ0ô Sô0<!�+ô <!ñ~ ˜Ÿ™˜ i¸+Ô
F€ôL�Kô Lñ^ ˜{¨aÔ0€	ôL�{ô Lô^K&Ð-ô K&ñ\ ,Ø	Ø3ô5Ð ô
K(Ð 0ô K(ñ\ 2Ø	 Ø5ô7Ð ñ 	‰W‹Y�^‰^Ó×#Ñ#Ó%Ó&€Ù!7¸¸{Ó!KÑ €Ðà
Ð)Ñ
)�r1   