ó
    Eñi	? ã                   ó‚  • S SK r S SKJr  S SKJrJr  S SKrS SKrS SKr	S SK
Jr  S SKJr  S SKJrJrJr  S SKJr  S SKJr  S S	KJr  S SKJr  S SKJs  Jr  S S
KJr  S SKJ s  J!r"  S SK#J$r$  SSK%J&r&  SSK'J(r)J*r+  SSK,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5  SSK6J7r7J8r8J9r9  SSK:J;r;J<r<J=r=J>r>J?r?J@r@JArAJBrB  SSKCJDrD  S SKEJFrF  S SKGJHrH  S SKIJJrJ  S rKS rLGS‹S jrM " S S\15      rN\N" SSSS9rO " S S\15      rP\P" S SSS S!9rQ " S" S#\15      rR\R" SS$S%9rS\	R¨                  " S&\	Rª                  -  5      rV\	R®                  " \V5      rXS' rYS( rZS) r[S* r\S+ r]S, r^S- r_S. r` " S/ S0\15      ra\a" S1S29rb " S3 S4\15      rc\c" SS5S%9rd " S6 S7\15      re\e" \	Rª                  * S8-  \	Rª                  S8-  S9S9rf " S: S;\15      rg\g" SSS<S9rh " S= S>\i5      rj " S? S@\H5      rkSA rlSB rm " SC SD\15      rn\n" SSSES9ro " SF SG\15      rp\p" SSHS%9rq " SI SJ\15      rr\r" SSSKS9rs " SL SM\15      rt\t" SSNS%9ru " SO SP\15      rv\v" SSQS%9rw " SR SS\t5      rx\x" SSTS%9ry " SU SV\15      rz\z" SWS29r{ " SX SY\15      r|\|" SSZS%9r} " S[ S\\15      r~\~" SS]S%9r " S^ S_\15      r€\€" \	Rª                  * \	Rª                  S`S9r� " Sa Sb\15      r‚\‚" ScS29rƒ " Sd Se\15      r„\„" S SfS%9r… " Sg Sh\15      r†\†" SiS29r‡ " Sj Sk\15      rˆ\ˆ" SSlS%9r‰ " Sm Sn\15      rŠ\Š" SoS29r‹Sp rŒ " Sq Sr\15      r�\�" SSsS%9rŽ " St Su\15      r�\�" SSvS%9r� " Sw Sx\15      r‘\‘" SSyS%9r’ " Sz S{\15      r“\“" SS|S%9r” " S} S~\15      r•\•" SSS%9r– " S€ S�\15      r—\—" SS‚S%9r˜ " Sƒ S„\15      r™\™" SS…S%9rš " S† S‡\15      r›\›" SˆS29rœS‰\œl�         " SŠ S‹\15      rž\ž" SSŒS�9rŸ " SŽ S�\15      r \ " S�S29r¡ " S‘ S’\15      r¢\¢" SS“S%9r£ " S” S•\15      r¤\¤" SS–S%9r¥ " S— S˜\15      r¦\¦" S™S29r§Sš r¨ " S› Sœ\15      r©\©" SS�S%9rª " Sž SŸ\©5      r«\«" SS S%9r¬ " S¡ S¢\15      r­\­" SS£S%9r® " S¤ S¥\15      r¯\¯" SS¦S%9r° " S§ S¨\15      r±\±" S©S29r² " Sª S«\15      r³\³" SS¬S%9r´S­ rµ " S® S¯\15      r¶\¶" S°S29r· " S± S²\15      r¸\¸" S³S29r¹ " S´ Sµ\15      rº\º" SS¶S%9r» " S· S¸\15      r¼\¼" SS¹S%9r½ " Sº S»\15      r¾\¾" SS¼S%9r¿ " S½ S¾\15      rÀ\À" S¿S29rÁ " SÀ SÁ\15      rÂ\Â" SSSÂS9rÃ " SÃ SÄ\15      rÄ\Ä" SSÅS%9rÅ " SÆ SÇ\15      rÆ\Æ" SSÈS%9rÇ " SÉ SÊ\15      rÈ\È" SSËS%9rÉ " SÌ SÍ\15      rÊ\Ê" SÎS29rË " SÏ SÐ\15      rÌ\Ì" S SÑS%9rÍ " SÒ SÓ\15      rÎ\Î" SÔS29rÏ " SÕ SÖ\15      rÐ\Ð" SSS×S9rÑ " SØ SÙ\15      rÒ\Ò" SÚS29rÓ " SÛ SÜ\15      rÔ\Ô" SÝS29rÕ " SÞ Sß\15      rÖ\Ö" SàS29r× " Sá Sâ\15      rØ\Ø" SãS29rÙSä rÚ " Så Sæ\15      rÛ\Û" SSçS%9rÜ " Sè Sé\15      rÝ\Ý" SSêS�9rÞ " Së Sì\15      rß\ß" SíS29rà " Sî Sï\15      rá\á" SðS29râ " Sñ Sò\15      rã\ã" SSóS%9räSô rå " Sõ Sö\15      ræ\æ" SS÷S%9rç " Sø Sù\15      rè\è" SSúS%9ré " Sû Sü\15      rê\ê" SSýS%9rë " Sþ Sÿ\15      rì\ì" SGS S%9rí " GS GS\15      rî\î" GSS29rï " GS GS\15      rð\ð" SGSS%9rñ " GS GS\15      rò\ò" GS	S29ró " GS
 GS\15      rô\ô" SGSS%9rõGS rö " GS GS\15      r÷\÷" SGSS%9rø " GS GS\15      rù\ù" SGSS%9rú " GS GS\15      rû\û" GSS29rü " GS GS\15      rý\ý" GSS29rþ " GS GS\15      rÿ\ÿ" SGSS%9Gr  " GS GS\15      GrG\" SGSS%9Gr " GS  GS!\15      GrG\" GS"S29Gr " GS# GS$\15      GrG\" SSGS%S9Gr " GS& GS'\15      GrG\" SGS(S%9Gr " GS) GS*\15      Gr	G\	" GS+S29Gr
 " GS, GS-\15      GrG\" GS.SGS/S9Gr " GS0 GS1\15      GrG\" SGS2S%9Gr " GS3 GS4\15      GrG\" GS5S29GrG\" GS6S29GrS‰G\l�        S‰G\l�         " GS7 GS8\15      GrG\" SGS9S%9Gr " GS: GS;\15      GrG\" GS<S29GrGS=G\l�         " GS> GS?\15      GrG\" SGS@S%9Gr " GSA GSB\15      GrG\" GS.SGSCS9Gr " GSD GSE\15      GrG\" GSFS29Gr " GSG GSH\15      GrG\" GSIS29Gr " GSJ GSK\15      GrG\" SSGSLS9Gr " GSM GSN\15      Gr G\ " SSGSOS9Gr! " GSP GSQ\15      Gr"G\"" SGSRS%9Gr#GSSG\#l�        GST Gr$GSU Gr%GSV Gr& " GSW GSX\15      Gr'G\'" GSYSGSZ9Gr(S‰G\(l�         " GS[ GS\\15      Gr)G\)" SGS]S%9Gr*GS^G\*l�         " GS_ GS`\15      Gr+G\+" GSaS29Gr, " GSb GSc\j5      Gr- " GSd GSe\15      Gr.G\." SSGSfS9Gr/ " GSg GSh\15      Gr0G\0" GSiS29Gr1G\0" \	Rª                  * \	Rª                  GSjS9Gr2 " GSk GSl\Æ5      Gr3G\3" SGSmS%9Gr4 " GSn GSo\15      Gr5G\5" SS&\	Rª                  -  GSpS9Gr6 " GSq GSr\15      Gr7G\7" GSsS29Gr8 " GSt GSu\15      Gr9G\9" S GSvS%9Gr: " GSw GSx\15      Gr;G\;" GSyGSzGS{9Gr<GS| Gr= " GS} GS~\15      Gr>G\>" GSGS€SSGS�9Gr? " GS‚ GSƒ\15      Gr@ " GS„ GS…\15      GrAG\A" GS†S \	GR„                  GS‡9GrC " GSˆ GS‰\15      GrDG\D" SGSŠS%9GrEG\F" G\G" 5       GR‘                  5       GR“                  5       5      GrJ\." G\J\15      u  GrKGrLG\KG\L-   GSƒ/-   GrMg(Œ  é    N)ÚIterable)ÚwrapsÚcached_property©Ú
Polynomial)ÚBSpline)Úextend_notes_in_docstringÚreplace_notes_in_docstringÚinherit_docstring_from)ÚLowLevelCallable)Úoptimize)Ú	integrate©Ú_lazyselect)Ú
xp_promoteé   )Ú_stats)Útukeylambda_varianceÚtukeylambda_kurtosis)	Ú_vectorize_rvs_over_shapesÚget_distribution_namesÚ	_kurtosisÚ_isintegralÚrv_continuousÚ_skewÚ_get_fixed_fit_valueÚ_check_shapeÚ
_ShapeInfo)ÚkolmognÚkolmognpÚkolmogni)Ú_XMINÚ_LOGXMINÚ_EULERÚ_ZETA3Ú_SQRT_PIÚ_SQRT_2_OVER_PIÚ_LOG_PIÚ_LOG_SQRT_2_OVER_PI)ÚCensoredData)Úroot_scalar)ÚFitErrorc                 óÀ   • U R                  SS5        U R                  SS5        U R                  SS5        U R                  SS5        U (       a  [        SU  S35      eg)aj  
Remove the optimizer-related keyword arguments 'loc', 'scale' and
'optimizer' from `kwds`.  Then check that `kwds` is empty, and
raise `TypeError("Unknown arguments: %s." % kwds)` if it is not.

This function is used in the fit method of distributions that override
the default method and do not use the default optimization code.

`kwds` is modified in-place.
ÚlocNÚscaleÚ	optimizerÚmethodzUnknown arguments: Ú.)ÚpopÚ	TypeError)Úkwdss    Ú[/home/mande/repo/quber/.venv/lib/python3.13/site-packages/scipy/stats/_continuous_distns.pyÚ_remove_optimizer_parametersr7   )   sY   € ð 	‡H�HˆU�DÔØ‡H�HˆW�dÔØ‡H�Hˆ[˜$ÔØ‡H�HˆX�tÔÞÜÐ-¨d¨V°1Ð5Ó6Ð6ð ó    c                 ó0   ^ • [        T 5      U 4S j5       nU$ )Nc                 ó  >• UR                  SS5      R                  5       n[        U[        5      nUS:X  d  U(       a1  UR	                  5       S:”  a  [
        [        U 5      U ]  " U/UQ70 UD6$ U(       a  UR                  nT" X/UQ70 UD6$ )Nr1   ÚmleÚmmr   )	ÚgetÚlowerÚ
isinstancer*   Únum_censoredÚsuperÚtypeÚfitÚ_uncensored)ÚselfÚdataÚargsr5   r1   ÚcensoredÚfuns         €r6   ÚwrapperÚ _call_super_mom.<locals>.wrapper@   s†   ø€ à—‘˜( EÓ*×0Ñ0Ó2ˆÜ˜d¤LÓ1ˆØ�T‹>žh¨4×+<Ñ+<Ó+>ÀÓ+BÜœ˜d› TÒ.¨tÐC°dÒC¸dÑCÐCæð ×'Ñ'�Ù�tÐ1 DÒ1¨DÑ1Ð1r8   )r   )rI   rJ   s   ` r6   Ú_call_super_momrL   <   s"   ø€ ô ˆ3ƒZô2ó ð2ð €Nr8   c                 óÒ   ^ • U=(       d    US-
  nX-
  nU 4S jnU" X!5      (       d@  US-  nX-
  nSn[         R                  " U5      (       a  [        U5      eU" X!5      (       d  M@  U$ )Nr   c                 óv   >• [         R                  " T" U 5      5      [         R                  " T" U5      5      :g  $ ©N©ÚnpÚsign)ÚlbrackÚrbrackrI   s     €r6   Úinterval_contains_rootÚ1_get_left_bracket.<locals>.interval_contains_rootX   s(   ø€ ä�wŠw‘s˜6“{Ó#¤r§w¢w©s°6«{Ó';Ñ;Ð;r8   é   zVThe solver could not find a bracket containing a root to an MLE first order condition.)rQ   ÚisinfÚFitSolverError)rI   rT   rS   ÚdiffrU   Úmsgs   `     r6   Ú_get_left_bracketr\   Q   so   ø€ à×!�v ‘z€FØ‰?€Dõ<ñ % V×4Ñ4Ø�‰	ˆØ‘ˆð7ˆä�8Š8�F×ÑÜ  Ó%Ð%ñ % V×4Ó4ð €Mr8   c                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)Ú	ksone_genéh   a!  Kolmogorov-Smirnov one-sided test statistic distribution.

This is the distribution of the one-sided Kolmogorov-Smirnov (KS)
statistics :math:`D_n^+` and :math:`D_n^-`
for a finite sample size ``n >= 1`` (the shape parameter).

%(before_notes)s

See Also
--------
kstwobign, kstwo, kstest

Notes
-----
:math:`D_n^+` and :math:`D_n^-` are given by

.. math::

    D_n^+ &= \text{sup}_x (F_n(x) - F(x)),\\
    D_n^- &= \text{sup}_x (F(x) - F_n(x)),\\

where :math:`F` is a continuous CDF and :math:`F_n` is an empirical CDF.
`ksone` describes the distribution under the null hypothesis of the KS test
that the empirical CDF corresponds to :math:`n` i.i.d. random variates
with CDF :math:`F`.

%(after_notes)s

References
----------
.. [1] Birnbaum, Z. W. and Tingey, F.H. "One-sided confidence contours
   for probability distribution functions", The Annals of Mathematical
   Statistics, 22(4), pp 592-596 (1951).

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

Display the probability density function (``pdf``):

>>> n = 1e+03
>>> x = np.linspace(ksone.ppf(0.01, n),
...                 ksone.ppf(0.99, n), 100)
>>> ax.plot(x, ksone.pdf(x, n),
...         'r-', lw=5, alpha=0.6, label='ksone pdf')

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

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

>>> rv = ksone(n)
>>> ax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')
>>> ax.legend(loc='best', frameon=False)
>>> plt.show()

Check accuracy of ``cdf`` and ``ppf``:

>>> vals = ksone.ppf([0.001, 0.5, 0.999], n)
>>> np.allclose([0.001, 0.5, 0.999], ksone.cdf(vals, n))
True

c                 ó@   • US:¬  U[         R                  " U5      :H  -  $ ©Nr   ©rQ   Úround©rE   Úns     r6   Ú	_argcheckÚksone_gen._argcheck¬   ó   € Ø�Q‘˜1¤§¢¨£Ñ+Ñ,Ð,r8   c                 ó@   • [        SSS[        R                  4S5      /$ ©Nre   Tr   ©TF©r   rQ   Úinf©rE   s    r6   Ú_shape_infoÚksone_gen._shape_info¯   ó   € Ü˜3  q¬"¯&©& k°=ÓAÐBÐBr8   c                 ó0   • [         R                  " X!5      * $ rO   )ÚscuÚ	_smirnovp©rE   Úxre   s      r6   Ú_pdfÚksone_gen._pdf²   s   € Ü—’˜aÓ#Ð#Ð#r8   c                 ó.   • [         R                  " X!5      $ rO   )rs   Ú	_smirnovcru   s      r6   Ú_cdfÚksone_gen._cdfµ   s   € Ü�}Š}˜QÓ"Ð"r8   c                 ó.   • [         R                  " X!5      $ rO   )ÚscÚsmirnovru   s      r6   Ú_sfÚksone_gen._sf¸   s   € Ü�zŠz˜!ÓÐr8   c                 ó.   • [         R                  " X!5      $ rO   )rs   Ú
_smirnovci©rE   Úqre   s      r6   Ú_ppfÚksone_gen._ppf»   s   € Ü�~Š~˜aÓ#Ð#r8   c                 ó.   • [         R                  " X!5      $ rO   )r~   Úsmirnovir„   s      r6   Ú_isfÚksone_gen._isf¾   ó   € Ü�{Š{˜1Ó Ð r8   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rf   ro   rw   r{   r€   r†   rŠ   Ú__static_attributes__r�   r8   r6   r^   r^   h   s-   † ñBòF-òCò$ò#ò ò$õ!r8   r^   ç        ç      ð?Úksone)ÚaÚbÚnamec                   óH   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rSrg)Ú	kstwo_genéÅ   a¨  Kolmogorov-Smirnov two-sided test statistic distribution.

This is the distribution of the two-sided Kolmogorov-Smirnov (KS)
statistic :math:`D_n` for a finite sample size ``n >= 1``
(the shape parameter).

%(before_notes)s

See Also
--------
kstwobign, ksone, kstest

Notes
-----
:math:`D_n` is given by

.. math::

    D_n = \text{sup}_x |F_n(x) - F(x)|

where :math:`F` is a (continuous) CDF and :math:`F_n` is an empirical CDF.
`kstwo` describes the distribution under the null hypothesis of the KS test
that the empirical CDF corresponds to :math:`n` i.i.d. random variates
with CDF :math:`F`.

%(after_notes)s

References
----------
.. [1] Simard, R., L'Ecuyer, P. "Computing the Two-Sided
   Kolmogorov-Smirnov Distribution",  Journal of Statistical Software,
   Vol 39, 11, 1-18 (2011).

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

Display the probability density function (``pdf``):

>>> n = 10
>>> x = np.linspace(kstwo.ppf(0.01, n),
...                 kstwo.ppf(0.99, n), 100)
>>> ax.plot(x, kstwo.pdf(x, n),
...         'r-', lw=5, alpha=0.6, label='kstwo pdf')

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

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

>>> rv = kstwo(n)
>>> ax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')
>>> ax.legend(loc='best', frameon=False)
>>> plt.show()

Check accuracy of ``cdf`` and ``ppf``:

>>> vals = kstwo.ppf([0.001, 0.5, 0.999], n)
>>> np.allclose([0.001, 0.5, 0.999], kstwo.cdf(vals, n))
True

c                 ó@   • US:¬  U[         R                  " U5      :H  -  $ ra   rb   rd   s     r6   rf   Úkstwo_gen._argcheck  rh   r8   c                 ó@   • [        SSS[        R                  4S5      /$ rj   rl   rn   s    r6   ro   Úkstwo_gen._shape_info  rq   r8   c                 ón   • S[        U[        5      (       d  U-  S4$ [        R                  " U5      -  S4$ ©Nç      à?r•   )r?   r   rQ   Ú
asanyarrayrd   s     r6   Ú_get_supportÚkstwo_gen._get_support  s>   € Øœj¨¬H×5Ñ5�QÑLØðð 	¼2¿=º=ÈÓ;KÑLØðð 	r8   c                 ó   • [        X!5      $ rO   )r    ru   s      r6   rw   Úkstwo_gen._pdf  s   € Ü˜‹~Ðr8   c                 ó   • [        X!5      $ rO   ©r   ru   s      r6   r{   Úkstwo_gen._cdf  s   € Ü�q‹}Ðr8   c                 ó   • [        X!SS9$ ©NF©Úcdfrª   ru   s      r6   r€   Úkstwo_gen._sf  s   € Ü�q Ñ'Ð'r8   c                 ó   • [        X!SS9$ )NTr®   ©r!   r„   s      r6   r†   Úkstwo_gen._ppf  s   € Ü˜ $Ñ'Ð'r8   c                 ó   • [        X!SS9$ r­   r²   r„   s      r6   rŠ   Úkstwo_gen._isf  s   € Ü˜ %Ñ(Ð(r8   r�   N)rŽ   r�   r�   r‘   r’   rf   ro   r¥   rw   r{   r€   r†   rŠ   r“   r�   r8   r6   r›   r›   Å   s2   † ñAòD-òCòòòò(ò(õ)r8   r›   Úkstwo)Úmomtyper—   r˜   r™   c                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)Úkstwobign_geni&  a¨  Limiting distribution of scaled Kolmogorov-Smirnov two-sided test statistic.

This is the asymptotic distribution of the two-sided Kolmogorov-Smirnov
statistic :math:`\sqrt{n} D_n` that measures the maximum absolute
distance of the theoretical (continuous) CDF from the empirical CDF.
(see `kstest`).

%(before_notes)s

See Also
--------
ksone, kstwo, kstest

Notes
-----
:math:`\sqrt{n} D_n` is given by

.. math::

    D_n = \text{sup}_x |F_n(x) - F(x)|

where :math:`F` is a continuous CDF and :math:`F_n` is an empirical CDF.
`kstwobign`  describes the asymptotic distribution (i.e. the limit of
:math:`\sqrt{n} D_n`) under the null hypothesis of the KS test that the
empirical CDF corresponds to i.i.d. random variates with CDF :math:`F`.

%(after_notes)s

References
----------
.. [1] Feller, W. "On the Kolmogorov-Smirnov Limit Theorems for Empirical
   Distributions",  Ann. Math. Statist. Vol 19, 177-189 (1948).

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úkstwobign_gen._shape_infoK  ó   € Øˆ	r8   c                 ó0   • [         R                  " U5      * $ rO   )rs   Ú_kolmogp©rE   rv   s     r6   rw   Úkstwobign_gen._pdfN  s   € Ü—’˜Q“ÐÐr8   c                 ó.   • [         R                  " U5      $ rO   )rs   Ú_kolmogcr¿   s     r6   r{   Úkstwobign_gen._cdfQ  s   € Ü�|Š|˜A‹Ðr8   c                 ó.   • [         R                  " U5      $ rO   )r~   Ú
kolmogorovr¿   s     r6   r€   Úkstwobign_gen._sfT  s   € Ü�}Š}˜QÓÐr8   c                 ó.   • [         R                  " U5      $ rO   )rs   Ú	_kolmogci©rE   r…   s     r6   r†   Úkstwobign_gen._ppfW  s   € Ü�}Š}˜QÓÐr8   c                 ó.   • [         R                  " U5      $ rO   )r~   ÚkolmogirÉ   s     r6   rŠ   Úkstwobign_gen._isfZ  s   € Ü�zŠz˜!‹}Ðr8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   r{   r€   r†   rŠ   r“   r�   r8   r6   r¹   r¹   &  s&   † ñ#òHò òò ò õr8   r¹   Ú	kstwobign)r—   r™   rW   c                 óJ   • [         R                  " U S-  * S-  5      [        -  $ ©NrW   ç       @)rQ   ÚexpÚ_norm_pdf_C©rv   s    r6   Ú	_norm_pdfrÕ   j  s    € Ü�6Š6�1�a‘4�%˜‘)Óœ{Ñ*Ð*r8   c                 ó"   • U S-  * S-  [         -
  $ rÐ   )Ú_norm_pdf_logCrÔ   s    r6   Ú_norm_logpdfrØ   n  s   € Øˆq‰Dˆ5�3‰;œÑ'Ð'r8   c                 ó.   • [         R                  " U 5      $ rO   )r~   ÚndtrrÔ   s    r6   Ú	_norm_cdfrÛ   r  s   € Ü�7Š7�1‹:Ðr8   c                 ó.   • [         R                  " U 5      $ rO   )r~   Úlog_ndtrrÔ   s    r6   Ú_norm_logcdfrÞ   v  s   € Ü�;Š;�q‹>Ðr8   c                 ó.   • [         R                  " U 5      $ rO   )r~   Úndtri©r…   s    r6   Ú	_norm_ppfrâ   z  s   € Ü�8Š8�A‹;Ðr8   c                 ó   • [        U * 5      $ rO   ©rÛ   rÔ   s    r6   Ú_norm_sfrå   ~  s   € Ü�a�R‹=Ðr8   c                 ó   • [        U * 5      $ rO   ©rÞ   rÔ   s    r6   Ú_norm_logsfrè   ‚  s   € Ü˜˜ÓÐr8   c                 ó   • [        U 5      * $ rO   ©râ   rá   s    r6   Ú	_norm_isfrë   †  s   € Ü�a‹Lˆ=Ðr8   c                   óŽ   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rS rS r\\" \SS9S 5       5       rS rSrg)Únorm_geniŠ  a]  A normal continuous random variable.

The location (``loc``) keyword specifies the mean.
The scale (``scale``) keyword specifies the standard deviation.

%(before_notes)s

Notes
-----
The probability density function for `norm` is:

.. math::

    f(x) = \frac{\exp(-x^2/2)}{\sqrt{2\pi}}

for a real number :math:`x`.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Únorm_gen._shape_info¡  r¼   r8   Nc                 ó$   • UR                  U5      $ rO   )Ústandard_normal©rE   ÚsizeÚrandom_states      r6   Ú_rvsÚnorm_gen._rvs¤  s   € Ø×+Ñ+¨DÓ1Ð1r8   c                 ó   • [        U5      $ rO   ©rÕ   r¿   s     r6   rw   Únorm_gen._pdf§  s   € ä˜‹|Ðr8   c                 ó   • [        U5      $ rO   ©rØ   r¿   s     r6   Ú_logpdfÚnorm_gen._logpdf«  ó   € Ü˜A‹Ðr8   c                 ó   • [        U5      $ rO   rä   r¿   s     r6   r{   Únorm_gen._cdf®  ó   € Ü˜‹|Ðr8   c                 ó   • [        U5      $ rO   rç   r¿   s     r6   Ú_logcdfÚnorm_gen._logcdf±  rþ   r8   c                 ó   • [        U5      $ rO   ©rå   r¿   s     r6   r€   Únorm_gen._sf´  s   € Ü˜‹{Ðr8   c                 ó   • [        U5      $ rO   )rè   r¿   s     r6   Ú_logsfÚnorm_gen._logsf·  s   € Ü˜1‹~Ðr8   c                 ó   • [        U5      $ rO   rê   rÉ   s     r6   r†   Únorm_gen._ppfº  r  r8   c                 ó   • [        U5      $ rO   ©rë   rÉ   s     r6   rŠ   Únorm_gen._isf½  r  r8   c                 ó   • g)N)r”   r•   r”   r”   r�   rn   s    r6   r   Únorm_gen._statsÀ  ó   € Ø!r8   c                 ó\   • S[         R                  " S[         R                  -  5      S-   -  $ ©Nr£   rW   r   ©rQ   ÚlogÚpirn   s    r6   Ú_entropyÚnorm_gen._entropyÃ  s"   € Ø”B—F’F˜1œRŸU™U™7“O AÑ%Ñ&Ð&r8   a}          For the normal distribution, method of moments and maximum likelihood
        estimation give identical fits, and explicit formulas for the estimates
        are available.
        This function uses these explicit formulas for the maximum likelihood
        estimation of the normal distribution parameters, so the
        `optimizer` and `method` arguments are ignored.

©Únotesc                 óª  • UR                  SS 5      nUR                  SS 5      n[        U5        Ub  Ub  [        S5      e[        R                  " U5      n[        R
                  " U5      R                  5       (       d  [        S5      eUc  UR                  5       nOUnUc,  [        R                  " X-
  S-  R                  5       5      nXV4$ UnXV4$ )NÚflocÚfscaleú3All parameters fixed. There is nothing to optimize.ú$The data contains non-finite values.rW   )	r3   r7   Ú
ValueErrorrQ   ÚasarrayÚisfiniteÚallÚmeanÚsqrt)rE   rF   r5   r  r  r.   r/   s          r6   rC   Únorm_gen.fitÆ  sÏ   € ð �x‰x˜ Ó%ˆØ—‘˜( DÓ)ˆä$ TÔ*àÑ Ñ 2ô ð )ó *ð *ô �zŠz˜$Óˆä�{Š{˜4Ó ×$Ñ$×&Ñ&ÜÐCÓDÐDà‰<Ø—)‘)“+‰CàˆCà‰>Ü—G’G˜d™j¨1™_×2Ñ2Ó4Ó5ˆEð ˆzÐð ˆEàˆzÐr8   c                 óh   • US:X  a  gUS-  S:X  a"  [         R                  " [        U5      S-
  5      $ g)zv
@returns Moments of standard normal distribution for integer n >= 0

See eq. 16 of https://arxiv.org/abs/1209.4340v2
r   r•   rW   r   r”   )r~   Ú
factorial2Úintrd   s     r6   Ú_munpÚnorm_gen._munpì  s3   € ð �‹6ØØˆq‰5�A‹:Ü—=’=¤ Q£¨!¡Ó,Ð,àr8   r�   ©NN)rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r  r€   r	  r†   rŠ   r   r  rL   r
   r   rC   r+  r“   r�   r8   r6   rí   rí   Š  sr   † ñò,ô2òòòòòòòòò"ò'ð Ù ð 6?ñ @ñó@ó ðõ<r8   rí   Únorm)r™   c                   óT   • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	rg
)Ú	alpha_geniý  aÖ  An alpha continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `alpha` ([1]_, [2]_) is:

.. math::

    f(x, a) = \frac{1}{x^2 \Phi(a) \sqrt{2\pi}} *
              \exp(-\frac{1}{2} (a-1/x)^2)

where :math:`\Phi` is the normal CDF, :math:`x > 0`, and :math:`a > 0`.

`alpha` takes ``a`` as a shape parameter.

%(after_notes)s

References
----------
.. [1] Johnson, Kotz, and Balakrishnan, "Continuous Univariate
       Distributions, Volume 1", Second Edition, John Wiley and Sons,
       p. 173 (1994).
.. [2] Anthony A. Salvia, "Reliability applications of the Alpha
       Distribution", IEEE Transactions on Reliability, Vol. R-34,
       No. 3, pp. 251-252 (1985).

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ©Nr—   Fr   ©FFrl   rn   s    r6   ro   Úalpha_gen._shape_info  ó   € Ü˜3 ¨¬2¯6©6 {°NÓCÐDÐDr8   c                 óN   • SUS-  -  [        U5      -  [        USU-  -
  5      -  $ ©Nr•   rW   )rÛ   rÕ   ©rE   rv   r—   s      r6   rw   Úalpha_gen._pdf"  s+   € à�A�q‘D‰zœ) A›,Ñ&¤y°°3°q±5±Ó'9Ñ9Ð9r8   c                 ó˜   • S[         R                  " U5      -  [        USU-  -
  5      -   [         R                  " [        U5      5      -
  $ )Néþÿÿÿr•   )rQ   r  rØ   rÛ   r8  s      r6   rü   Úalpha_gen._logpdf&  s8   € Ø”"—&’&˜“)‰|œl¨1¨S°©U©7Ó3Ñ3´b·f²f¼YÀq»\Ó6JÑJÐJr8   c                 ó<   • [        USU-  -
  5      [        U5      -  $ ©Nr•   rä   r8  s      r6   r{   Úalpha_gen._cdf)  s   € Ü˜˜3˜q™5™Ó!¤I¨a£LÑ0Ð0r8   c           
      ód   • S[         R                  " U[        U[        U5      -  5      -
  5      -  $ r>  )rQ   r"  râ   rÛ   ©rE   r…   r—   s      r6   r†   Úalpha_gen._ppf,  s(   € Ø”2—:’:˜a¤)¨A¬i¸«l©NÓ";Ñ;Ó<Ñ<Ð<r8   c                 óT   • [         R                  /S-  [         R                  /S-  -   $ ©NrW   ©rQ   rm   Únan©rE   r—   s     r6   r   Úalpha_gen._stats/  s!   € Ü—‘ˆx˜‰zœRŸV™V˜H Q™JÑ&Ð&r8   r�   N)rŽ   r�   r�   r‘   r’   r   Ú_open_support_maskÚ_support_maskro   rw   rü   r{   r†   r   r“   r�   r8   r6   r0  r0  ý  s4   † ñð> "×4Ñ4€MòEò:òKò1ò=õ'r8   r0  Úalphac                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)Ú
anglit_geni6  zîAn anglit continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `anglit` is:

.. math::

    f(x) = \sin(2x + \pi/2) = \cos(2x)

for :math:`-\pi/4 \le x \le \pi/4`.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úanglit_gen._shape_infoJ  r¼   r8   c                 ó4   • [         R                  " SU-  5      $ rD  )rQ   Úcosr¿   s     r6   rw   Úanglit_gen._pdfM  s   € ä�vŠv�a˜‘c‹{Ðr8   c                 ó\   • [         R                  " U[         R                  S-  -   5      S-  $ ©Né   rÑ   ©rQ   Úsinr  r¿   s     r6   r{   Úanglit_gen._cdfQ  s"   € Ü�vŠv�aœŸ™˜a™‘iÓ  #Ñ%Ð%r8   c                 ó\   • [         R                  " U[         R                  S-  -   5      S-  $ rT  )rQ   rQ  r  r¿   s     r6   r€   Úanglit_gen._sfT  s"   € Ü�vŠv�aœ"Ÿ%™% !™)‘mÓ$¨Ñ+Ð+r8   c                 ó~   • [         R                  " [         R                  " U5      5      [         R                  S-  -
  $ ©NrU  )rQ   Úarcsinr&  r  rÉ   s     r6   r†   Úanglit_gen._ppfW  s&   € Ü�yŠyœŸš ›Ó$¤R§U¡U¨1¡WÑ,Ð,r8   c                 óÖ   • S[         R                  [         R                  -  S-  S-
  SS[         R                  S-  S-
  -  [         R                  [         R                  -  S-
  S-  -  4$ )	Nr”   é   r£   r;  rU  é`   é   rW   ©rQ   r  rn   s    r6   r   Úanglit_gen._statsZ  sR   € Ø”B—E‘Eœ"Ÿ%™%‘K ‘N 3Ñ&¨¨R´·±¸±¸B±Ñ-?ÄÇÁÄrÇuÁuÁÈQÁÐQRÑ@RÑ-RÐRÐRr8   c                 ó4   • S[         R                  " S5      -
  $ ©Nr   rW   ©rQ   r  rn   s    r6   r  Úanglit_gen._entropy]  ó   € Ø”—’˜“‰{Ðr8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   r{   r€   r†   r   r  r“   r�   r8   r6   rM  rM  6  s+   † ñò&òò&ò,ò-òSõr8   rM  rU  Úanglitc                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)Úarcsine_genid  zäAn arcsine continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `arcsine` is:

.. math::

    f(x) = \frac{1}{\pi \sqrt{x (1-x)}}

for :math:`0 < x < 1`.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úarcsine_gen._shape_infox  r¼   r8   c                 óÀ   • [         R                  " SS9   S[         R                  -  [         R                  " USU-
  -  5      -  sS S S 5        $ ! , (       d  f       g = f)NÚignore©Údivider•   r   )rQ   Úerrstater  r&  r¿   s     r6   rw   Úarcsine_gen._pdf{  s;   € ä�[Š[ Ó)Ø”r—u‘u‘9œRŸWšW Q¨¨!©¡WÓ-Ñ-÷ *×)×)ús   •0AÁ
Ac                 ó~   • S[         R                  -  [         R                  " [         R                  " U5      5      -  $ ©NrÑ   )rQ   r  r]  r&  r¿   s     r6   r{   Úarcsine_gen._cdf€  s&   € Ø”2—5‘5‰yœŸš¤2§7¢7¨1£:Ó.Ñ.Ð.r8   c                 ó\   • [         R                  " [         R                  S-  U-  5      S-  $ rv  rV  rÉ   s     r6   r†   Úarcsine_gen._ppfƒ  s"   € Ü�vŠv”b—e‘e˜C‘i ‘kÓ" CÑ'Ð'r8   c                 ó   • SnSnSnSnXX44$ )Nr£   g      À?r   ç      ø¿r�   ©rE   ÚmuÚmu2Úg1Úg2s        r6   r   Úarcsine_gen._stats†  s    € ØˆØˆØˆØˆØ˜ˆÐr8   c                 ó   • g)Ng‘Á”°•ëÎ¿r�   rn   s    r6   r  Úarcsine_gen._entropy�  s   € Ø&r8   r�   N©rŽ   r�   r�   r‘   r’   ro   rw   r{   r†   r   r  r“   r�   r8   r6   rl  rl  d  s%   † ñò&ò.ò
/ò(òõ'r8   rl  Úarcsinec                   ó   • \ rS rSrSrS rSrg)ÚFitDataErrori”  z=Raised when input data is inconsistent with fixed parameters.c                 ó.   • SU< SU< SU< S34U l         g )Nz>Invalid values in `data`.  Maximum likelihood estimation with z requires that z < (x - loc)/scale  < z for each x in `data`.©rG   )rE   Údistrr>   Úuppers       r6   Ú__init__ÚFitDataError.__init__™  s/   € ðØ$™i °u±ið @"Ø"'¡Ð*@ðBð
ˆ�	r8   r‰  N©rŽ   r�   r�   r‘   r’   rŒ  r“   r�   r8   r6   r‡  r‡  ”  s
   † ÙGõ
r8   r‡  c                   ó   • \ rS rSrSrS rSrg)rY   i¡  zF
Raised when a solver fails to converge while fitting a distribution.
c                 ó@   • SnX!R                  SS5      -  nU4U l        g )Nz1Solver for the MLE equations failed to converge: Ú
Ú )ÚreplacerG   )rE   ÚmesgÚemsgs      r6   rŒ  ÚFitSolverError.__init__§  s#   € ØBˆØ—‘˜T 2Ó&Ñ&ˆØ�Gˆ�	r8   r‰  NrŽ  r�   r8   r6   rY   rY   ¡  s   † ñõ
r8   rY   c                 ót   • [         R                  " X-   5      nX2U* [         R                  " U 5      -   -  -
  nU$ rO   ©r~   Úpsi)r—   r˜   re   Ús1ÚpsiabÚfuncs         r6   Ú_beta_mle_ar�  ­  s4   € ô �FŠF�1‘5‹M€EØ�e�VœbŸfšf Q›iÑ'Ñ(Ñ(€DØ€Kr8   c                 óº   • U u  pE[         R                  " XE-   5      nX!U* [         R                  " U5      -   -  -
  X1U* [         R                  " U5      -   -  -
  /nU$ rO   r˜  )Úthetare   rš  Ús2r—   r˜   r›  rœ  s           r6   Ú_beta_mle_abr¡  ¶  sZ   € ð �D€AÜ�FŠF�1‘5‹M€EØ�u�fœrŸvšv a›yÑ(Ñ)Ñ)Ø�u�fœrŸvšv a›yÑ(Ñ)Ñ)ð+€Dà€Kr8   c                   ó–   ^ • \ rS rSrSrS rSS jrS rS rS r	S r
S	 rS
 rS rU 4S jr\\" \SS9U 4S j5       5       rS rSrU =r$ )Úbeta_geniÄ  aø  A beta continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `beta` is:

.. math::

    f(x, a, b) = \frac{\Gamma(a+b) x^{a-1} (1-x)^{b-1}}
                      {\Gamma(a) \Gamma(b)}

for :math:`0 <= x <= 1`, :math:`a > 0`, :math:`b > 0`, where
:math:`\Gamma` is the gamma function (`scipy.special.gamma`).

`beta` takes :math:`a` and :math:`b` as shape parameters.

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

Maximum likelihood estimates of parameters are only available when the location and
scale are fixed. When either of these parameters is free, ``beta.fit`` resorts to
numerical optimization, but this problem is unbounded: the location and scale may be
chosen to make the minimum and maximum elements of the data coincide with the
endpoints of the support, and the shape parameters may be chosen to make the PDF at
these points infinite. For best results, pass ``floc`` and ``fscale`` keyword
arguments to fix the location and scale, or use `scipy.stats.fit` with
``method='mse'``.

%(after_notes)s

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

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ ©Nr—   Fr   r3  r˜   rl   ©rE   ÚiaÚibs      r6   ro   Úbeta_gen._shape_infoí  ó9   € Ü˜˜U Q¬¯© K°Ó@ˆÜ˜˜U Q¬¯© K°Ó@ˆØˆxˆr8   c                 ó&   • UR                  XU5      $ rO   ©Úbeta)rE   r—   r˜   ró   rô   s        r6   rõ   Úbeta_gen._rvsò  s   € Ø× Ñ   tÓ,Ð,r8   c                 óŽ   • [         R                  " SS9   [        R                  " XU5      sS S S 5        $ ! , (       d  f       g = f©Nrp  ©Úover)rQ   rs  rs   Ú	_beta_pdf©rE   rv   r—   r˜   s       r6   rw   Úbeta_gen._pdfõ  s*   € ô �[Š[˜hÓ'Ü—=’=  qÓ)÷ (×'×'úó	   •6¶
Ac                 ó¤   • [         R                  " US-
  U* 5      [         R                  " US-
  U5      -   nU[         R                  " X#5      -  nU$ r>  )r~   Úxlog1pyÚxlogyÚbetaln)rE   rv   r—   r˜   ÚlPxs        r6   rü   Úbeta_gen._logpdfü  sC   € Ü�jŠj˜˜S™ 1 "Ó%¬¯ª°°S±¸!Ó(<Ñ<ˆØŒr�yŠy˜‹ÑˆØˆ
r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   Úbetaincr´  s       r6   r{   Úbeta_gen._cdf  s   € Ü�zŠz˜! Ó"Ð"r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   Úbetainccr´  s       r6   r€   Úbeta_gen._sf  s   € Ü�{Š{˜1 Ó#Ð#r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   Úbetainccinvr´  s       r6   rŠ   Úbeta_gen._isf  s   € Ü�~Š~˜a AÓ&Ð&r8   c                 ó0   • [         R                  " XU5      $ rO   )rs   Ú	_beta_ppf©rE   r…   r—   r˜   s       r6   r†   Úbeta_gen._ppf
  s   € Ü�}Š}˜Q 1Ó%Ð%r8   c                 ó  • X-   nX-  nX-  US-  US-   -  -  nSX!-
  -  [         R                  " US-   5      -  US-   [         R                  " X-  5      -  -  nSX-
  S-  US-   -  X-  US-   -  -
  -  nX-  US-   -  US-   -  nXx-  n	UUUU	4$ )NrW   r   é   é   ©rQ   r&  )
rE   r—   r˜   Úa_plus_bÚ
_beta_meanÚ_beta_varianceÚ_beta_skewnessÚ_beta_kurtosis_excess_nÚ_beta_kurtosis_excess_dÚ_beta_kurtosis_excesss
             r6   r   Úbeta_gen._stats  sÉ   € Ø‘5ˆØ‘Zˆ
Ø™ ¨!¡¨x¸!©|Ñ <Ñ=ˆØ ¡™;¬¯ª°¸A±Ó)>Ñ>Ø$ q™L¬B¯GªG°A±E«NÑ:ñ<ˆà"#¨©°¡z°XÀ±\Ñ'BØ'(¡u°¸1±Ñ'=ñ(>ñ #?Ðà"#¡%¨8°a©<Ñ"8¸HÀq¹LÑ"IÐØ 7Ñ QÐàØØØ!ð	#ð 	#r8   c                 óÜ   >^^• [        U[        5      (       a  UR                  5       n[        U5      m[	        U5      mUU4S jn[
        R                  " US5      u  p4[        TU ]!  XU4S9$ )Nc                 ó>  >• U u  pSX!-
  -  [         R                  " X-   S-   5      -  X-   S-   -  [         R                  " X-  5      -  nUS-  US-  SU-  S-
  -  -
  US-  US-   -  -   SU-  U-  US-   -  -
  nXAU-  X-   S-   -  X-   S-   -  -  nUS-  nUT-
  UT-
  /$ )NrW   r   rÌ  rË  rÍ  )rv   r—   r˜   ÚskÚkur  r€  s        €€r6   rœ  Ú beta_gen._fitstart.<locals>.func$  sÃ   ø€ Ø‰DˆAØ�A‘C‘œŸš ¡¨¡Ó+Ñ+¨q©u°q©yÑ9¼B¿GºGÀAÁC»LÑHˆBØ�A‘˜˜1™˜a ™c !™e™Ñ$ q¨!¡t¨Q¨q©S¡zÑ1°A°a±C¸±E¸1¸Q¹3±KÑ?ˆBØ�A‘#�q‘s˜1‘u‘+˜q™s 1™uÑ%Ñ%ˆBØ�!‰GˆBØ�r‘E˜2˜b™5�>Ð!r8   )r•   r•   r‰  )	r?   r*   Ú	_uncensorr   r   r   ÚfsolverA   Ú	_fitstart)rE   rF   rœ  r—   r˜   r  r€  Ú	__class__s        @@€r6   rÝ  Úbeta_gen._fitstart  s^   ú€ Ü�dœL×)Ñ)Ø—>‘>Ó#ˆDä�4‹[ˆÜ�t‹_ˆö	"ô �Š˜t ZÓ0‰ˆÜ‰wÑ  °¨FÐ Ð3Ð3r8   zÓ        In the special case where `method="MLE"` and
        both `floc` and `fscale` are given, a
        `ValueError` is raised if any value `x` in `data` does not satisfy
        `floc < x < floc + fscale`.

r  c           	      ó   >• UR                  SS 5      nUR                  SS 5      nUb  Uc  [        TU ]  " U/UQ70 UD6$ UR                  SS 5        UR                  SS 5        [	        U/ SQ5      n[	        U/ SQ5      n[        U5        Ub  Ub  [        S5      e[        R                  " U5      R                  5       (       d  [        S5      e[        R                  " U5      U-
  U-  n[        R                  " US:*  5      (       d  [        R                  " US:¬  5      (       a  [        S	XDU-   S
9eUR                  5       nUc  Ub‚  Ub  Un	SU-
  nSU-
  nOUn	X˜-  SU-
  -  n
[        R                  " [         U
U	[#        U5      [        R$                  " U5      R'                  5       4SS9u  p¼pÞUS:w  a	  [)        US9eUS   n
Ub  XšpšO¯[        R$                  " U5      R'                  5       n[*        R,                  " U* 5      R'                  5       nUSU-
  -  UR/                  SS9-  S-
  nUU-  n
SU-
  U-  n	[        R                  " [0        X©/[#        U5      UU4SS9u  p¼pÞUS:w  a	  [)        US9eUu  p©X©XE4$ )Nr  r  ©Úf0ÚfaÚfix_a)Úf1ÚfbÚfix_br  r   r   r   r­  ©r>   r‹  T)rG   Úfull_output)r”  )Úddof)r=   rA   rC   r3   r   r7   r!  rQ   r#  r$  ÚravelÚanyr‡  r%  r   rÜ  r�  Úlenr  ÚsumrY   r~   Úlog1pÚvarr¡  )rE   rF   rG   r5   r  r  râ  rå  Úxbarr˜   r—   rŸ  ÚinfoÚierr”  rš  r   ÚfacrÞ  s                     €r6   rC   Úbeta_gen.fit.  s‡  ø€ ð �x‰x˜ Ó%ˆØ—‘˜( DÓ)ˆà‰<˜6™>ä‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ð 	�‰�˜ÔØ�‰�˜4Ô ä! $Ò(=Ó>ˆÜ! $Ò(=Ó>ˆä$ TÔ*à‰>˜b™näð )ó *ð *ô �{Š{˜4Ó ×$Ñ$×&Ñ&ÜÐCÓDÐDô —’˜“ Ñ%¨Ñ/ˆÜ�6Š6�$˜!‘)×Ñ¤§¢ t¨q¡y× 1Ñ 1Ü˜v¨TÀ¹ÑGÐGà�y‰y‹{ˆà‰>˜R™^ð ‰~ð �Ø˜4‘x�Ø˜4‘x‘à�ð ‘˜A ™HÑ%ˆAô &.§_¢_Ü˜QØœ˜T›¤B§F¢F¨4£L×$4Ñ$4Ó$6Ð7Ø ñ&Ñ"ˆE˜ð
 �a‹xÜ$¨$Ñ/Ð/Ø�a‘ˆAà‰~ð �1øô —’˜“×!Ñ!Ó#ˆBÜ—’˜4˜%“×$Ñ$Ó&ˆBð ˜!˜d™(Ñ# d§h¡h°A hÐ&6Ñ6¸Ñ:ˆCØ�s‘
ˆAØ�T‘˜SÑ ˆAô &.§_¢_Ü˜q˜fÜ˜$“i  RÐ(Ø ñ&Ñ"ˆE˜ð
 �a‹xÜ$¨$Ñ/Ð/Ø‰DˆAà�TÐ!Ð!r8   c                 óÖ   ^	• S nS nS m	U	4S jnS nU" U5      nU" U5      n[        US:¬  US:¬  -  US:*  X!-
  S:¬  -  X':¬  -  US:*  X-
  S:¬  -  X:¬  -  US:  US:  -  /UT	XS/X/5      $ )	Nc                 óä   • [         R                  " X5      U S-
  [         R                  " U 5      -  -
  US-
  [         R                  " U5      -  -
  X-   S-
  [         R                  " X-   5      -  -   $ rf  )r~   rº  r™  ©r—   r˜   s     r6   ÚregularÚ"beta_gen._entropy.<locals>.regularš  s`   € Ü—I’I˜a“O q¨1¡u´·²°q³	Ñ&9Ñ9Ø˜‘UœbŸfšf Q›iÑ'ñ(Ø+,©5°1©9¼¿º¸q¹u»Ñ*EñFð Gr8   c                 ó°  • X-   nS[         R                  " S[         R                  -  5      [         R                  " U 5      -   [         R                  " U5      -   S[         R                  " U5      -  -
  S-   -  nSU-  SUS-  -  -   US-  -   SUS	-  -  -
  nS
U -  SU S-  -  -
  U S-  -
  U S	-  -   nS
U-  SUS-  -  -
  US-  -
  US	-  -   nX4U-   U-   S-  -   $ )Nr£   rW   rÌ  r   én   é   ç       Àç      Àç      ÀiÎÿÿÿé
   éx   r  )r—   r˜   Úsum_abÚlog_termÚt1Út2Út3s          r6   Úasymptotic_ab_largeÚ.beta_gen._entropy.<locals>.asymptotic_ab_largež  së   € Ø‘UˆFØÜ—’�qœŸ™‘w“¤"§&¢&¨£)Ñ+¬b¯fªf°Q«iÑ7¸!¼B¿FºFÀ6»NÑ:JÑJÈQÑNñˆHð �V‘˜b ¨¡™oÑ-°¸±Ñ<¸qÀÈÁ¹~ÑMˆBØ�Q‘˜˜A˜t™G™Ñ# a¨¡gÑ-°°4±Ñ7ˆBØ�Q‘˜˜A˜t™G™Ñ# a¨¡gÑ-°°4±Ñ7ˆBØ B™w¨™|¨sÑ2Ñ2Ð2r8   c                 ó
  • X-   n[         R                  " U 5      U S-
  [         R                  " U 5      -  -
  nSSU-  -  SSU-  -  -   US-  S-  -
  US-  S-  -
  US-  S-  -   US	-  S
-  -   US-  S
-  -
  SU-  -   SSU-  -  -
  US-  S-  -   US-  S-  -   US-  S-  -
  US	-  S
-  -
  US-  S-  -   nU[        R                  " X-  5      -  [        R
                  " U5      -   S[        R
                  " U5      -  -
  nX4-   U-   $ )Nr   éÿÿÿÿrW   é   rþ  rÿ  r  r   ç      Àéü   ç      ÀrË  é<   é~   )r~   Úgammalnr™  rQ   rï  r  )r—   r˜   r  r  r  r  s         r6   Úasymptotic_b_largeÚ-beta_gen._entropy.<locals>.asymptotic_b_large¨  sG  € Ø‘UˆFÜ—’˜A“ ! a¡%¬2¯6ª6°!«9Ñ!4Ñ4ˆBà�Q�q‘S‘	˜A˜r !™t™HÑ$ q¨$¡w¨r¡zÑ1°A°t±G¸C±KÑ?À!ÀTÁ'È#Á+ÑMØ�T‘'˜#‘+ñØ ! 4¡¨¡ñ,Ø./°©hñ7Ø9:¸B¸v¹I¹ñGà˜$‘,˜q‘.ñ!à#)¨4¡<°Ñ#3ñ4à6<¸d±lÀ2±oñFð ˜$‘,˜sÑ"ñ#ð &,¨T¡\°#Ñ%5ñ6ð ð œbŸhšh q¡s›mÑ+¬b¯fªf°Q«iÑ7¸!¼B¿FºFÀ6»NÑ:JÑJˆHØ‘7˜XÑ%Ð%r8   c                 ó   >• T" X5      $ rO   r�   )r—   r˜   r  s     €r6   Úasymptotic_a_largeÚ-beta_gen._entropy.<locals>.asymptotic_a_large´  s   ø€ Ù% aÓ+Ð+r8   c                 óÌ   • [         R                  " [         R                  " U 5      5      n[         R                  " U SU-  -  5      S-   n[        R                  " U S:g  X!4S SS9$ )Nr  rW   r•   c                 ó   • U SSU-   -  -  $ )Nr  é   r�   )Úd_Új_s     r6   Ú<lambda>Ú<beta_gen._entropy.<locals>.threshold_large.<locals>.<lambda>º  s   € ÀBÈÈaÐRTÉfÉÒDUr8   iè  ©Ú
fill_value)rQ   ÚfloorÚlog10ÚxpxÚapply_where)ÚvÚjÚds      r6   Úthreshold_largeÚ*beta_gen._entropy.<locals>.threshold_large·  sT   € Ü—’œŸš !›Ó%ˆAÜ—’˜˜R 1™W™Ó%¨Ñ)ˆAÜ—?’? 1¨¡8¨a¨VÑ5UØ.2ñ4ð 4r8   g    ÀëRAg    (±RAg    €„.Ar   )
rE   r—   r˜   rù  r  r  r(  Úthreshold_aÚthreshold_br  s
            @r6   r  Úbeta_gen._entropy™  s­   ø€ ò	Gò	3ò
	&õ	,ò	4ñ & aÓ(ˆÙ% aÓ(ˆÜ˜Q &™[¨Q°&©[Ñ9Ø %™Z¨A©E°S©LÑ9¸QÑ=MÑNØ %™Z¨A©E°S©LÑ9¸QÑ=MÑNØ ™Y¨1¨u©9Ñ5ðð
 0Ð1CØ.ð9à˜6ó
ð 	
r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r€   rŠ   r†   r   rÝ  rL   r	   r   rC   r  r“   Ú__classcell__©rÞ  s   @r6   r£  r£  Ä  sp   ø† ñ'òPô
-ò*òò
#ò$ò'ò&ò#õ 4ð" Ù˜}ð 5+ñ ,ô
c"ó,ó ðc"÷J.
ð .
r8   r£  r­  c                   ód   • \ rS rSrSr\R                  rS rSS jr	S r
S rS rS	 rS
 rS rSrg)Úbetaprime_geniÍ  a'  A beta prime continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `betaprime` is:

.. math::

    f(x, a, b) = \frac{x^{a-1} (1+x)^{-a-b}}{\beta(a, b)}

for :math:`x >= 0`, :math:`a > 0`, :math:`b > 0`, where
:math:`\beta(a, b)` is the beta function (see `scipy.special.beta`).

`betaprime` takes ``a`` and ``b`` as shape parameters.

The distribution is related to the `beta` distribution as follows:
If :math:`X` follows a beta distribution with parameters :math:`a, b`,
then :math:`Y = X/(1-X)` has a beta prime distribution with
parameters :math:`a, b` ([1]_).

The beta prime distribution is a reparametrized version of the
F distribution.  The beta prime distribution with shape parameters
``a`` and ``b`` and ``scale = s`` is equivalent to the F distribution
with parameters ``d1 = 2*a``, ``d2 = 2*b`` and ``scale = (a/b)*s``.
For example,

>>> from scipy.stats import betaprime, f
>>> x = [1, 2, 5, 10]
>>> a = 12
>>> b = 5
>>> betaprime.pdf(x, a, b, scale=2)
array([0.00541179, 0.08331299, 0.14669185, 0.03150079])
>>> f.pdf(x, 2*a, 2*b, scale=(a/b)*2)
array([0.00541179, 0.08331299, 0.14669185, 0.03150079])

%(after_notes)s

References
----------
.. [1] Beta prime distribution, Wikipedia,
       https://en.wikipedia.org/wiki/Beta_prime_distribution

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ r¥  rl   r¦  s      r6   ro   Úbetaprime_gen._shape_infoÿ  rª  r8   Nc                 óZ   • [         R                  XUS9n[         R                  X#US9nXV-  $ ©N©ró   rô   )ÚgammaÚrvs)rE   r—   r˜   ró   rô   Úu1Úu2s          r6   rõ   Úbetaprime_gen._rvs  s-   € Ü�Y‰Y�q°,ˆYÐ?ˆÜ�Y‰Y�q°,ˆYÐ?ˆØ‰wˆr8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   ©rQ   rÒ   rü   r´  s       r6   rw   Úbetaprime_gen._pdf	  ó   € ä�vŠv�d—l‘l 1¨Ó+Ó,Ð,r8   c                 ó˜   • [         R                  " US-
  U5      [         R                  " X#-   U5      -
  [         R                  " X#5      -
  $ r>  )r~   r¹  r¸  rº  r´  s       r6   rü   Úbetaprime_gen._logpdf  s6   € Ü�xŠx˜˜C™ Ó#¤b§j¢j°±¸Ó&:Ñ:¼R¿YºYÀq»_ÑLÐLr8   c                 óB   • [         R                  " US:„  XU4S S 5      $ )Nr   c                 ó:   • [         R                  SSU -   -  X!5      $ ra   ©r­  r€   ©Úx_Úa_Úb_s      r6   r  Ú$betaprime_gen._cdf.<locals>.<lambda>  s   € œtŸx™x¨¨Q°©V©°bÔ=r8   c                 ó:   • [         R                  U SU -   -  X5      $ ra   ©r­  r{   rD  s      r6   r  rH    s   € œtŸy™y¨¨q°2©v©¸Ô?r8   ©r#  r$  r´  s       r6   r{   Úbetaprime_gen._cdf  s*   € ô �ŠØ�‰E�A˜!�9Ù=Ù?óAð 	Ar8   c                 óB   • [         R                  " US:„  XU4S S 5      $ )Nr   c                 ó:   • [         R                  SSU -   -  X!5      $ ra   rJ  rD  s      r6   r  Ú#betaprime_gen._sf.<locals>.<lambda>   s   € œtŸy™y¨¨a°"©f©°rÔ>r8   c                 ó:   • [         R                  U SU -   -  X5      $ ra   rC  rD  s      r6   r  rO  !  s   € œtŸx™x¨¨a°"©f©°rÔ>r8   rK  r´  s       r6   r€   Úbetaprime_gen._sf  s(   € Ü�ŠØ�‰E�A˜!�9Ù>Ù>ó@ð 	@r8   c                 óä  • [         R                  " XU5      u  pn[        R                  R	                  XU5      n[         R
                  " SS9   USU-
  -  nS S S 5        US:„  n[         R                  " U5      (       a/  U(       a&  S[        R                  R                  XU5      -  S-
  nW$ S[        R                  R                  X   X6   X&   5      -  S-
  WU'   U$ ! , (       d  f       N�= f)Nrp  rq  r   g§èH.ÿï?)rQ   Úbroadcast_arraysÚstatsr­  r†   rs  ÚisscalarrŠ   )rE   Úpr—   r˜   ÚrÚoutÚrnear1s          r6   r†   Úbetaprime_gen._ppf#  sÄ   € Ü×%Ò% a¨AÓ.‰ˆˆaô �J‰J�O‰O˜A !Ó$ˆÜ�[Š[ Ó)Ø�q˜1‘u‘+ˆC÷ *à�V‘ˆÜ�;Š;�q�>‰>ÞØœŸ
™
Ÿ™¨¨aÓ0Ñ0°1Ñ4�ð ˆ
ð œEŸJ™JŸO™O¨A©I°q±yÀ!Á)ÓLÑLÈqÑPˆC�‰KØˆ
÷ *Õ)ús   Á	C!Ã!
C/c                 ó^   ^• [         R                  " UT:„  X#4U4S j[        R                  S9$ )Nc                 óš   >• [         R                  " [        S[        T5      S-   5       Vs/ s H  o U-   S-
  X-
  -  PM     snSS9$ s  snf )Nr   r   ©Úaxis)rQ   ÚprodÚranger*  )r—   r˜   Úire   s      €r6   r  Ú%betaprime_gen._munp.<locals>.<lambda>8  s@   ø€ œŸš¼¸qÄ#ÀaÃ&ÈÁ(Ô9KÓ!LÒ9K°A Q¡3 q¡5¨1©3¤-Ñ9KÑ!LÐSTÒUùÒ!Ls   ¬Ar  ©r#  r$  rQ   rm   )rE   re   r—   r˜   s    `  r6   r+  Úbetaprime_gen._munp5  s)   ø€ Ü�ŠØ�‰E�A�6ÜUÜ—v‘vñð 	r8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rõ   rw   rü   r{   r€   r†   r+  r“   r�   r8   r6   r0  r0  Í  s@   † ñ.ð^ "×4Ñ4€Mòô
ò
-òMòAò@òõ$r8   r0  Ú	betaprimec                   ó@   • \ rS rSrSrS rS rS rS rSS jr	S r
S	rg
)Úbradford_geni?  a6  A Bradford continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `bradford` is:

.. math::

    f(x, c) = \frac{c}{\log(1+c) (1+cx)}

for :math:`0 <= x <= 1` and :math:`c > 0`.

`bradford` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ©NÚcFr   r3  rl   rn   s    r6   ro   Úbradford_gen._shape_infoU  r5  r8   c                 óD   • X"U-  S-   -  [         R                  " U5      -  $ r>  ©r~   rï  ©rE   rv   rj  s      r6   rw   Úbradford_gen._pdfX  s   € à�a‘C˜#‘I‰¤§¢¨!£Ñ,Ð,r8   c                 ó`   • [         R                  " X!-  5      [         R                  " U5      -  $ rO   rm  rn  s      r6   r{   Úbradford_gen._cdf\  s   € Ü�xŠx˜™‹}œrŸxšx¨›{Ñ*Ð*r8   c                 ób   • [         R                  " U[         R                  " U5      -  5      U-  $ rO   ©r~   Úexpm1rï  ©rE   r…   rj  s      r6   r†   Úbradford_gen._ppf_  s"   € Ü�xŠx˜œBŸHšH Q›K™Ó(¨1Ñ,Ð,r8   c                 ój  • [         R                  " SU-   5      nX-
  X-  -  nUS-   U-  SU-  -
  SU-  U-  U-  -  nS nS nSU;   a{  [         R                  " S5      SU-  U-  SU-  U-  US-   -  -
  SU-  U-  XS-   -  S-   -  -   -  nU[         R                  " XUS-
  -  SU-  -   -  5      SU-  US-
  -  SU-  -   -  -  nS	U;   ai  US-  US-
  -  USU-  S
-
  -  S-   -  SU-  U-  U-  US-
  -  US-
  -  -   SU-  U-  U-  SU-  S-
  -  -   SUS-  -  -   nUSU-  XS-
  -  SU-  -   S-  -  -  nXEXg4$ )Nr•   rÑ   rW   Úsr  é	   rÌ  rË  Úkr`  é   rU  é   )rQ   r  r&  )rE   rj  Úmomentsrz  r}  r~  r  r€  s           r6   r   Úbradford_gen._statsb  s�  € Ü�FŠF�3�q‘5‹MˆØ‰c�A‘C‰[ˆØ�#‘�q‰y˜˜Q™‰  1¡ Q¡ q¡Ñ)ˆØˆØˆØ�'‹>Ü—’˜“˜R ™T !™V A a¡C¨¡E¨1¨Q©3¡KÑ/°°!±°A±°q¸A¹#±w¸q±yÑ0AÑAÑBˆBØ”"—'’'˜!  !¡™W Q q¡S™[™/Ó*¨A¨a©C°°1±©I°a¸±c©MÑ:Ñ:ˆBØ�'‹>Ø�Q‘$˜˜!™‘*˜a  1¡ R¡™j¨™mÑ,¨R°©T°!©V°A©X°q¸±s©^¸Q¸q¹SÑ-AÑAØ�A‘#�a‘%˜‘'˜1˜Q™3˜r™6Ñ"ñ#Ø%'¨¨1©¡Wñ-ˆBà�!�A‘#�q˜A™#‘w˜q ™s‘{ QÑ&Ñ&Ñ&ˆBØ˜ˆÐr8   c                 óp   • [         R                  " SU-   5      nUS-  [         R                  " X-  5      -
  $ ©Nr   rÑ   rg  )rE   rj  rz  s      r6   r  Úbradford_gen._entropyq  s,   € Ü�FŠF�1�Q‘3‹KˆØ�‰u”r—v’v˜a™c“{Ñ"Ð"r8   r�   N©Úmvr„  r�   r8   r6   rg  rg  ?  s&   † ñò*Eò-ò+ò-ôõ#r8   rg  Úbradfordc                   óZ   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rS rSrg)Úburr_geniy  a  A Burr (Type III) continuous random variable.

%(before_notes)s

See Also
--------
fisk : a special case of either `burr` or `burr12` with ``d=1``
burr12 : Burr Type XII distribution
mielke : Mielke Beta-Kappa / Dagum distribution

Notes
-----
The probability density function for `burr` is:

.. math::

    f(x; c, d) = c d \frac{x^{-c - 1}}
                          {{(1 + x^{-c})}^{d + 1}}

for :math:`x >= 0` and :math:`c, d > 0`.

`burr` takes ``c`` and ``d`` as shape parameters for :math:`c` and
:math:`d`.

This is the PDF corresponding to the third CDF given in Burr's list;
specifically, it is equation (11) in Burr's paper [1]_. The distribution
is also commonly referred to as the Dagum distribution [2]_. If the
parameter :math:`c < 1` then the mean of the distribution does not
exist and if :math:`c < 2` the variance does not exist [2]_.
The PDF is finite at the left endpoint :math:`x = 0` if :math:`c * d >= 1`.

%(after_notes)s

References
----------
.. [1] Burr, I. W. "Cumulative frequency functions", Annals of
   Mathematical Statistics, 13(2), pp 215-232 (1942).
.. [2] https://en.wikipedia.org/wiki/Dagum_distribution
.. [3] Kleiber, Christian. "A guide to the Dagum distributions."
   Modeling Income Distributions and Lorenz Curves  pp 97-117 (2008).

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ ©Nrj  Fr   r3  r'  rl   ©rE   ÚicÚids      r6   ro   Úburr_gen._shape_infoª  rª  r8   c                 óp   • [         R                  " US:H  XU4S S 5      nUR                  S:X  a  US   $ U$ )Nr   c                 ó0   • X-  XU-  S-
  -  -  SX-  -   -  $ ra   r�   ©rE  Úc_r  s      r6   r  Úburr_gen._pdf.<locals>.<lambda>³  s    € ˜r™w¨"°"©u°Q©w©-Ñ8¸AÀÁ¹JÒGr8   c                 ó:   • X-  X* S-
  -  -  SX* -  -   US-   -  -  $ ©Nr•   r   r�   r�  s      r6   r  r‘  ´  s.   €  ¡¨2°#¸±)Ñ+<Ñ =Ø"# b¨S¡k¡/°r¸C±xÑ!@ò!Br8   r�   ©r#  r$  Úndim©rE   rv   rj  r'  Úoutputs        r6   rw   Úburr_gen._pdf¯  sC   € ä—’Ø�‰F�Q˜1�IÙGñCóDˆð
 $Ÿ[™[¨AÓ-ˆv�b‰zÐ9°6Ð9r8   c                 óp   • [         R                  " US:H  XU4S S 5      nUR                  S:X  a  US   $ U$ )Nr   c                 óÔ   • [         R                  " U5      [         R                  " U5      -   [        R                  " X-  S-
  U 5      -   US-   [        R                  " X-  5      -  -
  $ ra   )rQ   r  r~   r¹  rï  r�  s      r6   r  Ú"burr_gen._logpdf.<locals>.<lambda>»  sK   € ¤§¢ r£
¬R¯VªV°B«ZÑ 7¼"¿(º(À2Á5È1Á9ÈbÓ:QÑ QØ#% a¡4¬2¯8ª8°B±HÓ+=Ñ"=ò!>r8   c                 óÐ   • [         R                  " U5      [         R                  " U5      -   [        R                  " U* S-
  U 5      -   [        R                  " US-   X* -  5      -
  $ ra   ©rQ   r  r~   r¹  r¸  r�  s      r6   r  r›  ½  sM   € ¤§¢ r£
¬R¯VªV°B«ZÑ 7Ü"$§(¢(¨B¨3°©7°BÓ"7ñ!8ä"$§*¢*¨R°©T°2¸±9Ó"=ò!>r8   r�   r”  r–  s        r6   rü   Úburr_gen._logpdf¸  sD   € Ü—’Ø�‰F�Q˜1�Iñ?ñ?ó	@ˆð $Ÿ[™[¨AÓ-ˆv�b‰zÐ9°6Ð9r8   c                 ó   • SX* -  -   U* -  $ ra   r�   ©rE   rv   rj  r'  s       r6   r{   Úburr_gen._cdfÂ  s   € Ø�A˜‘G‘ ˜rÑ"Ð"r8   c                 ó<   • [         R                  " X* -  5      U* -  $ rO   rm  r   s       r6   r  Úburr_gen._logcdfÅ  s   € Ü�xŠx˜˜B™Ó  Q BÑ'Ð'r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   ©rQ   rÒ   r	  r   s       r6   r€   Úburr_gen._sfÈ  ó   € Ü�vŠv�d—k‘k !¨Ó*Ó+Ð+r8   c                 óD   • [         R                  " SX* -  -   U* -  * 5      $ ra   ©rQ   rï  r   s       r6   r	  Úburr_gen._logsfË  s#   € Ü�xŠx˜1˜q 2™w™;¨1¨"Ñ-Ð-Ó.Ð.r8   c                 ó$   • USU-  -  S-
  SU-  -  $ ©Nç      ð¿r   r�   ©rE   r…   rj  r'  s       r6   r†   Úburr_gen._ppfÎ  s   € Ø�D˜‘F‘˜a‘ 4¨¡6Ñ*Ð*r8   c                 óp   • [         R                  " SU-  U* 5      n[         R                  " U5      SU-  -  $ ©Nr­  ©r~   r¸  rt  )rE   r…   rj  r'  Ú_qs        r6   rŠ   Úburr_gen._isfÑ  s/   € Ü�ZŠZ˜˜q™ 1 "Ó%ˆÜ�xŠx˜‹|  q¡Ñ)Ð)r8   c                 ó²  • [         R                  " SS5      R                  SS5      U-  n[        R                  " X#-   SU-
  5      U-  u  pEpg[         R
                  " US:„  U[         R                  5      nXXS-  -
  n	[         R
                  " US:„  U	[         R                  5      n
[        R                  " US:„  XEXi4S [         R                  S	9n[        R                  " US
:„  XEXgU	4S [         R                  S	9n[         R                  " U5      S:X  a>  UR                  5       U
R                  5       UR                  5       UR                  5       4$ XŠX¼4$ )Nr   é   rU  r•   rW   rÑ   ç      @c                 ó^   • USU-  U -  -
  SU S-  -  -   [         R                  " US-  5      -  $ )NrÌ  rW   rÍ  )Úe1Úe2Úe3Úmu2_if_cs       r6   r  Ú!burr_gen._stats.<locals>.<lambda>Þ  s3   € ¨2°°"±°R±©<¸!¸BÀ¹E¹'Ñ+AÜ-/¯WªW°hÀ±]Ó-Cò+Dr8   r  ç      @c                 óT   • USU-  U -  -
  SU-  U S-  -  -   SU S-  -  -
  US-  -  S-
  $ )NrU  rË  rW   rÌ  r�   )r¹  rº  r»  Úe4r¼  s        r6   r  r½  ã  s=   € Ø�q˜‘t˜B‘w‘,  2¡ b¨!¡e¡Ñ+¨a°°A±©gÑ5¸À1¹ÑDÈÒIr8   r   )rQ   ÚarangeÚreshaper~   r­  ÚwhererF  r#  r$  r•  Úitem)rE   rj  r'  Úncr¹  rº  r»  rÀ  r}  r¼  r~  r  r€  s                r6   r   Úburr_gen._statsÕ  s  € Ü�YŠY�q˜!‹_×$Ñ$ Q qÓ)¨AÑ-ˆäŸš ¡¨¨b©Ó1°AÑ5‰ˆ�Ü�XŠX�a˜#‘g˜r¤2§6¡6Ó*ˆØ˜A™‘:ˆÜ�hŠh�q˜3‘w ¬"¯&©&Ó1ˆÜ�_Š_Ø�‰G�b˜bÐ+ñEä—v‘vñ	ˆô
 �_Š_Ø�‰G�b˜b hÐ/ñKä—v‘vñ	ˆô
 �7Š7�1‹:˜‹?Ø—7‘7“9˜cŸh™h›j¨"¯'©'«)°R·W±W³YÐ>Ð>Ø˜ˆÐr8   c                 óð   • S n[         R                  " U5      [         R                  " U5      [         R                  " U5      p2n[        R                  " X!:„  X:H  -  X3:H  -  XU4U[         R                  S9$ )Nc                 óP   • SU -  U-  nU[         R                  " SU-
  X#-   5      -  $ r>  ©r~   r­  ©re   rj  r'  rÅ  s       r6   Ú__munpÚburr_gen._munp.<locals>.__munpë  ó+   € Ø�a‘˜!‘ˆBØ”r—w’w˜s R™x¨©Ó0Ñ0Ð0r8   r  )rQ   r"  r#  r$  rF  )rE   re   rj  r'  Ú_burr_gen__munps        r6   r+  Úburr_gen._munpê  s`   € ò	1ô —*’*˜Q“-¤§¢¨A£´·
²
¸1³ˆaˆÜ�Š ¡¨!©&Ñ1°Q±VÑ<Ø ! a˜y¨&¼R¿V¹VñEð 	Er8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r  r€   r	  r†   rŠ   r   r+  r“   r�   r8   r6   r†  r†  y  s@   † ñ+ò`ò
:ò:ò#ò(ò,ò/ò+ò*òõ*Er8   r†  Úburrc                   óT   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rSrg)Ú
burr12_geniö  a  A Burr (Type XII) continuous random variable.

%(before_notes)s

See Also
--------
fisk : a special case of either `burr` or `burr12` with ``d=1``
burr : Burr Type III distribution

Notes
-----
The probability density function for `burr12` is:

.. math::

    f(x; c, d) = c d \frac{x^{c-1}}
                          {(1 + x^c)^{d + 1}}

for :math:`x >= 0` and :math:`c, d > 0`.

`burr12` takes ``c`` and ``d`` as shape parameters for :math:`c`
and :math:`d`.

This is the PDF corresponding to the twelfth CDF given in Burr's list;
specifically, it is equation (20) in Burr's paper [1]_.

%(after_notes)s

The Burr type 12 distribution is also sometimes referred to as
the Singh-Maddala distribution from NIST [2]_.

References
----------
.. [1] Burr, I. W. "Cumulative frequency functions", Annals of
   Mathematical Statistics, 13(2), pp 215-232 (1942).

.. [2] https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/b12pdf.htm

.. [3] "Burr distribution",
   https://en.wikipedia.org/wiki/Burr_distribution

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ rˆ  rl   r‰  s      r6   ro   Úburr12_gen._shape_info#  rª  r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  r   s       r6   rw   Úburr12_gen._pdf(  r>  r8   c                 óÎ   • [         R                  " U5      [         R                  " U5      -   [        R                  " US-
  U5      -   [        R                  " U* S-
  X-  5      -   $ ra   r�  r   s       r6   rü   Úburr12_gen._logpdf,  sI   € Ü�vŠv�a‹yœ2Ÿ6š6 !›9Ñ$¤r§x¢x°°A±°qÓ'9Ñ9¼B¿JºJÈÀrÈ!ÁtÈQÉTÓ<RÑRÐRr8   c                 óP   • [         R                  " U R                  XU5      5      * $ rO   ©r~   rt  r	  r   s       r6   r{   Úburr12_gen._cdf/  ó   € Ü—’˜Ÿ™ Q¨1Ó-Ó.Ð.Ð.r8   c                 óB   • [         R                  " SX-  -   U* -  * 5      $ ra   rm  r   s       r6   r  Úburr12_gen._logcdf2  s!   € Ü�xŠx˜!˜a™d™( q bÑ)Ð)Ó*Ð*r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r¥  r   s       r6   r€   Úburr12_gen._sf5  r§  r8   c                 ó6   • [         R                  " U* X-  5      $ rO   ©r~   r¸  r   s       r6   r	  Úburr12_gen._logsf8  s   € Ü�zŠz˜1˜"˜a™dÓ#Ð#r8   c                 óp   • [         R                  " SU-  [         R                  " U* 5      -  5      SU-  -  $ ©Nr  r   rs  r®  s       r6   r†   Úburr12_gen._ppf;  s/   € ô �xŠx˜˜1™œrŸxšx¨¨›|Ñ+Ó,¨q°©sÑ3Ð3r8   c                 ón   • [         R                  " SU-  [        R                  " U5      -  5      SU-  -  $ rå  )r~   rt  rQ   r  )rE   rV  rj  r'  s       r6   rŠ   Úburr12_gen._isfA  s+   € Ü�xŠx˜˜1™œrŸvšv a›yÑ(Ó)¨A¨a©CÑ0Ð0r8   c                 ó`   • S n[         R                  " X#-  U:„  XU4U[        R                  S9$ )Nc                 óP   • SU -  U-  nU[         R                  " SU-   X#-
  5      -  $ r>  rÉ  rÊ  s       r6   Úmoment_if_existsÚ*burr12_gen._munp.<locals>.moment_if_existsE  rÍ  r8   r  ©r#  r$  rQ   rF  )rE   re   rj  r'  rë  s        r6   r+  Úburr12_gen._munpD  s2   € ò	1ô �Š˜q™u q™y¨1°¨)Ð5EÜ*,¯&©&ñ2ð 	2r8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r  r€   r	  r†   rŠ   r+  r“   r�   r8   r6   rÒ  rÒ  ö  s;   † ñ+òXò
-òSò/ò+ò,ò$ò4ò1õ2r8   rÒ  Úburr12c                   ó`   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rSrg)Úfisk_geniP  aV  A Fisk continuous random variable.

The Fisk distribution is also known as the log-logistic distribution.

%(before_notes)s

See Also
--------
burr

Notes
-----
The probability density function for `fisk` is:

.. math::

    f(x, c) = \frac{c x^{c-1}}
                   {(1 + x^c)^2}

for :math:`x >= 0` and :math:`c > 0`.

Please note that the above expression can be transformed into the following
one, which is also commonly used:

.. math::

    f(x, c) = \frac{c x^{-c-1}}
                   {(1 + x^{-c})^2}

`fisk` takes ``c`` as a shape parameter for :math:`c`.

`fisk` is a special case of `burr` or `burr12` with ``d=1``.

Suppose ``X`` is a logistic random variable with location ``l``
and scale ``s``. Then ``Y = exp(X)`` is a Fisk (log-logistic)
random variable with ``scale = exp(l)`` and shape ``c = 1/s``.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úfisk_gen._shape_info{  r5  r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  rw   rn  s      r6   rw   Úfisk_gen._pdf~  s   € ä�y‰y˜˜sÓ#Ð#r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  r{   rn  s      r6   r{   Úfisk_gen._cdf‚  ó   € Ü�y‰y˜˜sÓ#Ð#r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  r€   rn  s      r6   r€   Úfisk_gen._sf…  s   € Ü�x‰x˜˜cÓ"Ð"r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  rü   rn  s      r6   rü   Úfisk_gen._logpdfˆ  s   € ä�|‰|˜A #Ó&Ð&r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  r  rn  s      r6   r  Úfisk_gen._logcdfŒ  s   € Ü�|‰|˜A #Ó&Ð&r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  r	  rn  s      r6   r	  Úfisk_gen._logsf�  s   € Ü�{‰{˜1 Ó%Ð%r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  r†   rn  s      r6   r†   Úfisk_gen._ppf’  rø  r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  rŠ   ru  s      r6   rŠ   Úfisk_gen._isf•  rø  r8   c                 ó.   • [         R                  XS5      $ r>  )rÐ  r+  ©rE   re   rj  s      r6   r+  Úfisk_gen._munp˜  s   € Ü�z‰z˜! Ó$Ð$r8   c                 ó.   • [         R                  US5      $ r>  )rÐ  r   ©rE   rj  s     r6   r   Úfisk_gen._stats›  s   € Ü�{‰{˜1˜cÓ"Ð"r8   c                 ó4   • S[         R                  " U5      -
  $ rD  rg  r	  s     r6   r  Úfisk_gen._entropyž  ó   € Ø”2—6’6˜!“9‰}Ðr8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   r{   r€   rü   r  r	  r†   rŠ   r+  r   r  r“   r�   r8   r6   rñ  rñ  P  sE   † ñ)òTEò$ò$ò#ò'ò'ò&ò$ò$ò%ò#õr8   rñ  Úfiskc                   óX   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rSS jrSrg)Ú
cauchy_geni¥  aÂ  A Cauchy continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `cauchy` is

.. math::

    f(x) = \frac{1}{\pi (1 + x^2)}

for a real number :math:`x`.

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

%(after_notes)s

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

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úcauchy_gen._shape_infoÀ  r¼   r8   c                 ó–   • [         R                  " SS9   S[         R                  -  SX-  -   -  sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r•   )rQ   rs  r  r¿   s     r6   rw   Úcauchy_gen._pdfÃ  s0   € ä�[Š[˜hÓ'Ø”r—u‘u‘9˜c !¡#™gÑ&÷ (×'×'ús	   •:º
Ac                 ój   • [         R                  " U5      n[        R                  " US:  US S 5      $ )Nr   c                 óD   • [         * [        R                  " U S-  5      -
  $ rD  )r(   rQ   rï  ©Úabsxs    r6   r  Ú$cauchy_gen._logpdf.<locals>.<lambda>Ô  s   € œ'˜¤B§H¢H¨T°1©WÓ$5Ò5r8   c                 ó~   • [         * S[        R                  " U 5      -  [        R                  " SU -  S-  5      -   -
  $ ©NrW   r   )r(   rQ   r  rï  r  s    r6   r  r  Õ  s-   € œ7˜( a¬¯ª¨t«¡n´r·x²xÀÀ4ÁÈ!ÁÓ7LÑ&LÒMr8   )rQ   Úabsr#  r$  )rE   rv   r  s      r6   rü   Úcauchy_gen._logpdfÈ  s5   € ô �vŠv�a‹yˆô �ŠØ�1‰H�dÙ5ÙNóPð 	Pr8   c                 óT   • [         R                  " SU* 5      [         R                  -  $ ra   ©rQ   Úarctan2r  r¿   s     r6   r{   Úcauchy_gen._cdf×  s   € Ü�zŠz˜!˜a˜RÓ ¤§¡Ñ&Ð&r8   c                 ó2   • [         R                  " USS5      $ ©Nr   r   )rs   Ú_cauchy_ppfrÉ   s     r6   r†   Úcauchy_gen._ppfÚ  ó   € Ü�Š˜q ! QÓ'Ð'r8   c                 óR   • [         R                  " SU5      [         R                  -  $ ra   r  r¿   s     r6   r€   Úcauchy_gen._sfÝ  s   € Ü�zŠz˜!˜QÓ¤§¡Ñ%Ð%r8   c                 ó2   • [         R                  " USS5      $ r#  )rs   Ú_cauchy_isfrÉ   s     r6   rŠ   Úcauchy_gen._isfà  r&  r8   c                 ó~   • [         R                  [         R                  [         R                  [         R                  4$ rO   ©rQ   rF  rn   s    r6   r   Úcauchy_gen._statsã  ó!   € Ü�v‰v”r—v‘vœrŸv™v¤r§v¡vÐ-Ð-r8   c                 óP   • [         R                  " S[         R                  -  5      $ r\  r  rn   s    r6   r  Úcauchy_gen._entropyæ  ó   € Ü�vŠv�aœŸ™‘g‹Ðr8   Nc                 ó–   • [        U[        5      (       a  UR                  5       n[        R                  " U/ SQ5      u  p4nXEU-
  S-  4$ ©N©é   é2   éK   rW   ©r?   r*   rÛ  rQ   Ú
percentile©rE   rF   rG   Úp25Úp50Úp75s         r6   rÝ  Úcauchy_gen._fitstarté  ó@   € ä�dœL×)Ñ)Ø—>‘>Ó#ˆDÜŸš dªLÓ9‰ˆ�#Ø˜3‘Y ‘MÐ!Ð!r8   r�   rO   )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   rŠ   r   r  rÝ  r“   r�   r8   r6   r  r  ¥  s:   † ñò4ò'ò
Pò'ò(ò&ò(ò.ò÷"r8   r  Úcauchyc                   óX   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rSrg)Úchi_geniô  a—  A chi continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `chi` is:

.. math::

    f(x, k) = \frac{1}{2^{k/2-1} \Gamma \left( k/2 \right)}
               x^{k-1} \exp \left( -x^2/2 \right)

for :math:`x >= 0` and :math:`k > 0` (degrees of freedom, denoted ``df``
in the implementation). :math:`\Gamma` is the gamma function
(`scipy.special.gamma`).

Special cases of `chi` are:

    - ``chi(1, loc, scale)`` is equivalent to `halfnorm`
    - ``chi(2, 0, scale)`` is equivalent to `rayleigh`
    - ``chi(3, 0, scale)`` is equivalent to `maxwell`

`chi` takes ``df`` as a shape parameter.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ©NÚdfFr   r3  rl   rn   s    r6   ro   Úchi_gen._shape_info  ó   € Ü˜4 ¨¬B¯F©F¨°^ÓDÐEÐEr8   Nc                 óR   • [         R                  " [        R                  XUS95      $ r4  )rQ   r&  Úchi2r7  ©rE   rF  ró   rô   s       r6   rõ   Úchi_gen._rvs  s   € Ü�wŠw”t—x‘x ¸L�xÐIÓJÐJr8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  ©rE   rv   rF  s      r6   rw   Úchi_gen._pdf  s   € ô �vŠv�d—l‘l 1Ó)Ó*Ð*r8   c                 óè   • [         R                  " S5      S[         R                  " S5      -  U-  -
  [        R                  " SU-  5      -
  nU[        R                  " US-
  U5      -   SUS-  -  -
  $ )NrW   r£   r•   )rQ   r  r~   r  r¹  )rE   rv   rF  Úls       r6   rü   Úchi_gen._logpdf  s]   € Ü�FŠF�1‹I˜œ2Ÿ6š6 !›9™ R™Ñ'¬"¯*ª*°R¸±UÓ*;Ñ;ˆØ”2—8’8˜B ™G QÓ'Ñ'¨"¨Q°©T©'Ñ1Ð1r8   c                 óB   • [         R                  " SU-  SUS-  -  5      $ ©Nr£   rW   ©r~   ÚgammaincrN  s      r6   r{   Úchi_gen._cdf#  s   € Ü�{Š{˜2˜b™5 " Q¨¡T¡'Ó*Ð*r8   c                 óB   • [         R                  " SU-  SUS-  -  5      $ rT  ©r~   Ú	gammainccrN  s      r6   r€   Úchi_gen._sf&  s   € Ü�|Š|˜B˜r™E 2 a¨¡d¡7Ó+Ð+r8   c                 ód   • [         R                  " S[        R                  " SU-  U5      -  5      $ ©NrW   r£   ©rQ   r&  r~   Úgammaincinv©rE   r…   rF  s      r6   r†   Úchi_gen._ppf)  s%   € Ü�wŠw�qœŸš¨¨2©¨qÓ1Ñ1Ó2Ð2r8   c                 ód   • [         R                  " S[        R                  " SU-  U5      -  5      $ r]  ©rQ   r&  r~   Úgammainccinvr`  s      r6   rŠ   Úchi_gen._isf,  s%   € Ü�wŠw�qœŸš¨¨B©°Ó2Ñ2Ó3Ð3r8   c                 ó~  • [         R                  " S5      [        R                  " SU-  S5      -  nXU-  -
  nSUS-  -  USSU-  -
  -  -   [         R                  " [         R
                  " US5      5      -  nSU-  SU-
  -  SUS-  -  -
  SUS-  -  SU-  S-
  -  -   nU[         R                  " US	-  5      -  nX#XE4$ )
NrW   r£   r·  r   ç      ø?r•   rË  rU  rÑ   )rQ   r&  r~   Úpochr"  Úpower©rE   rF  r}  r~  r  r€  s         r6   r   Úchi_gen._stats/  s¾   € ä�WŠW�Q‹Zœ"Ÿ'š' #¨¡(¨CÓ0Ñ0ˆØ�b‘5‰jˆØ��C‘‰i˜"˜a  "¡™f™+Ñ%¤r§z¢z´"·(²(¸3ÀÓ2DÓ'EÑEˆØˆr‰T�3�r‘6‰]˜1˜R ™U™7Ñ" Q r¨1¡u¡W°°"±°Q±Ñ%7Ñ7ˆØ
Œb�jŠj˜˜c™Ó"Ñ"ˆØ˜ˆÐr8   c                 óD   • S nS n[         R                  " US:  XU5      $ )Nc                 ó®   • [         R                  " SU -  5      SU [        R                  " S5      -
  U S-
  [         R                  " SU -  5      -  -
  -  -   $ r  )r~   r  rQ   r  Údigamma©rF  s    r6   Úregular_formulaÚ)chi_gen._entropy.<locals>.regular_formula:  sM   € Ü—J’J˜r B™wÓ'Ø˜R¤"§&¢&¨£)™^¨r°A©v¼¿ºÀCÈ"ÁHÓ9MÑ.MÑMÑNñOð Pr8   c                 óž   • S[         R                  " [         R                  5      S-  -   U S-  S-  -
  U S-  S-  -
  SU S-  -  -
  U S-  S	-  -   $ )
Nr£   rW   r  rË  r;  glÁlÁ¶?éýÿÿÿéüÿÿÿé   r  ro  s    r6   Úasymptotic_formulaÚ,chi_gen._entropy.<locals>.asymptotic_formula>  sY   € Øœ"Ÿ&š&¤§¡›-¨™/Ñ)¨R°©V°Q©JÑ6¸"¸b¹&À!¹ÑCØ˜B ™F‘mñ$Ø')¨2¡v¨r¡kñ2ð 3r8   i,  rK  )rE   rF  rp  rv  s       r6   r  Úchi_gen._entropy8  s'   € ò	Pò	3ô �Š˜r C™x¨Ð>PÓQÐQr8   r�   r-  ©rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r€   r†   rŠ   r   r  r“   r�   r8   r6   rC  rC  ô  s<   † ñò<FôKò+ò2ò+ò,ò3ò4òõ
Rr8   rC  Úchic                   óX   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rSrg)Úchi2_geniH  a|  A chi-squared continuous random variable.

For the noncentral chi-square distribution, see `ncx2`.

%(before_notes)s

See Also
--------
ncx2

Notes
-----
The probability density function for `chi2` is:

.. math::

    f(x, k) = \frac{1}{2^{k/2} \Gamma \left( k/2 \right)}
               x^{k/2-1} \exp \left( -x/2 \right)

for :math:`x > 0`  and :math:`k > 0` (degrees of freedom, denoted ``df``
in the implementation).

`chi2` takes ``df`` as a shape parameter.

The chi-squared distribution is a special case of the gamma
distribution, with gamma parameters ``a = df/2``, ``loc = 0`` and
``scale = 2``.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ rE  rl   rn   s    r6   ro   Úchi2_gen._shape_infoj  rH  r8   Nc                 ó$   • UR                  X5      $ rO   )Ú	chisquarerK  s       r6   rõ   Úchi2_gen._rvsm  s   € Ø×%Ñ% bÓ/Ð/r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rN  s      r6   rw   Úchi2_gen._pdfp  s   € ä�vŠv�d—l‘l 1Ó)Ó*Ð*r8   c                 ó¶   • [         R                  " US-  S-
  U5      US-  -
  [         R                  " US-  5      -
  [        R                  " S5      U-  S-  -
  $ )NrÑ   r   rW   )r~   r¹  r  rQ   r  rN  s      r6   rü   Úchi2_gen._logpdft  sM   € Ü�xŠx˜˜2™˜a™ Ó# a¨¡dÑ*¬R¯ZªZ¸¸2¹Ó->Ñ>Ä"Ç&Â&ÈÃ)ÈBÁ,ÐPRÑARÑRÐRr8   c                 ó.   • [         R                  " X!5      $ rO   )r~   ÚchdtrrN  s      r6   r{   Úchi2_gen._cdfw  ó   € Ü�xŠx˜‹Ðr8   c                 ó.   • [         R                  " X!5      $ rO   )r~   ÚchdtrcrN  s      r6   r€   Úchi2_gen._sfz  ó   € Ü�yŠy˜ÓÐr8   c                 ó.   • [         R                  " X!5      $ rO   )r~   Úchdtri©rE   rV  rF  s      r6   rŠ   Úchi2_gen._isf}  r�  r8   c                 ó<   • S[         R                  " US-  U5      -  $ rD  ©r~   r_  r�  s      r6   r†   Úchi2_gen._ppf€  s   € Ø”—’  1¡ aÓ(Ñ(Ð(r8   c                 óZ   • UnSU-  nS[         R                  " SU-  5      -  nSU-  nX#XE4$ )NrW   rÑ   ç      (@rÍ  rj  s         r6   r   Úchi2_gen._statsƒ  s9   € ØˆØ�‰dˆØŒr�wŠw�s˜2‘v‹ÑˆØ�"‰WˆØ˜ˆÐr8   c                 óN   • SU-  nS nS n[         R                  " US:  UX45      $ )Nr£   c                 óœ   • U [         R                  " S5      -   [        R                  " U 5      -   SU -
  [        R                  " U 5      -  -   $ r  )rQ   r  r~   r  r™  )Úhalf_dfs    r6   rp  Ú*chi2_gen._entropy.<locals>.regular_formula�  s>   € ØœbŸfšf Q›iÑ'¬"¯*ª*°WÓ*=Ñ=Ø˜‘[¤B§F¢F¨7£OÑ3ñ4ð 5r8   c                 óü   • [         R                  " S5      SS[         R                  " S[         R                  -  5      -   -  -   nSU -  nUSUSUSUS-  -   -  -   -  -   -  S[         R                  " U 5      -  -   U-   $ )NrW   r£   r   gUUUUUUå¿çUUUUUUÕ¿glÁlÁ¶¿g      @r  )rš  rj  Úhs      r6   rv  Ú-chi2_gen._entropy.<locals>.asymptotic_formula‘  s   € ô —’�q“	˜C ¤R§V¢V¨A¬b¯e©e©G£_Ñ!4Ñ5Ñ5ˆAØ�G‘ˆAØ�t˜a ¨¨5°1°S±5©=Ñ(9Ñ!9Ñ:Ñ:Ñ;ØœŸš˜w›Ñ'ñ(Ø*+ñ,ð -r8   é}   rK  )rE   rF  rš  rp  rv  s        r6   r  Úchi2_gen._entropyŠ  s5   € Ø˜‘(ˆò	5ò		-ô �Š˜w¨™}¨gØ.óDð 	Dr8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r€   rŠ   r†   r   r  r“   r�   r8   r6   r|  r|  H  s=   † ñ òBFô0ò+òSòò ò ò)òõDr8   r|  rJ  c                   óN   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rSrg)Ú
cosine_geni£  a0  A cosine continuous random variable.

%(before_notes)s

Notes
-----
The cosine distribution is an approximation to the normal distribution.
The probability density function for `cosine` is:

.. math::

    f(x) = \frac{1}{2\pi} (1+\cos(x))

for :math:`-\pi \le x \le \pi`.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úcosine_gen._shape_info¸  r¼   r8   c                 ó\   • S[         R                  -  S[         R                  " U5      -   -  $ ©Nr£   r   ©rQ   r  rQ  r¿   s     r6   rw   Úcosine_gen._pdf»  s!   € à”R—U‘U‰{˜AœbŸfšf Q›i™KÑ(Ð(r8   c                 ó‚   • [         R                  " U5      n[        R                  " US:g  US [         R                  * S9$ )Nr  c                 ó~   • [         R                  " U 5      [         R                  " S[         R                  -  5      -
  $ rD  )rQ   rï  r  r  ©rj  s    r6   r  Ú$cosine_gen._logpdf.<locals>.<lambda>Â  s!   € ¬¯ª°!«´r·v²v¸aÄÇÁ¹g³Ò)Fr8   r  )rQ   rQ  r#  r$  rm   rn  s      r6   rü   Úcosine_gen._logpdf¿  s4   € Ü�FŠF�1‹IˆÜ�Š˜q B™w¨ÙFÜ+-¯6©6¨'ñ3ð 	3r8   c                 ó.   • [         R                  " U5      $ rO   ©rs   Ú_cosine_cdfr¿   s     r6   r{   Úcosine_gen._cdfÅ  s   € Ü�Š˜qÓ!Ð!r8   c                 ó0   • [         R                  " U* 5      $ rO   r°  r¿   s     r6   r€   Úcosine_gen._sfÈ  s   € Ü�Š ˜rÓ"Ð"r8   c                 ó.   • [         R                  " U5      $ rO   ©rs   Ú_cosine_invcdf©rE   rV  s     r6   r†   Úcosine_gen._ppfË  s   € Ü×!Ò! !Ó$Ð$r8   c                 ó0   • [         R                  " U5      * $ rO   r¶  r¸  s     r6   rŠ   Úcosine_gen._isfÎ  s   € Ü×"Ò" 1Ó%Ð%Ð%r8   c                 óä   • [         R                  [         R                  -  S-  S-
  nS[         R                  S-  S-
  -  S[         R                  [         R                  -  S-
  S-  -  -  nS	US	U4$ )
Nr·  rÑ   r  rU  éZ   ç      @rË  rW   r”   rc  )rE   r%  rz  s      r6   r   Úcosine_gen._statsÑ  sa   € Ü�U‰U”R—U‘U‰]˜SÑ  CÑ'ˆØ”B—E‘E˜1‘H˜r‘MÑ" c¬R¯U©U´R·U±U©]¸QÑ->ÀÑ,BÑ&BÑCˆØ�A�s˜Aˆ~Ðr8   c                 óV   • [         R                  " S[         R                  -  5      S-
  $ )NrU  r•   r  rn   s    r6   r  Úcosine_gen._entropyÖ  s   € Ü�vŠv�aœŸ™‘g‹˜sÑ"Ð"r8   r�   N©rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r€   r†   rŠ   r   r  r“   r�   r8   r6   r£  r£  £  s4   † ñò(ò)ò3ò"ò#ò%ò&òõ
#r8   r£  Úcosinec                   óX   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rSrg)Ú
dgamma_geniÝ  aˆ  A double gamma continuous random variable.

The double gamma distribution is also known as the reflected gamma
distribution [1]_.

%(before_notes)s

Notes
-----
The probability density function for `dgamma` is:

.. math::

    f(x, a) = \frac{1}{2\Gamma(a)} |x|^{a-1} \exp(-|x|)

for a real number :math:`x` and :math:`a > 0`. :math:`\Gamma` is the
gamma function (`scipy.special.gamma`).

`dgamma` takes ``a`` as a shape parameter for :math:`a`.

%(after_notes)s

References
----------
.. [1] Johnson, Kotz, and Balakrishnan, "Continuous Univariate
       Distributions, Volume 1", Second Edition, John Wiley and Sons
       (1994).

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r2  rl   rn   s    r6   ro   Údgamma_gen._shape_infoý  r5  r8   Nc                 ó„   • UR                  US9n[        R                  XUS9nU[        R                  " US:¬  SS5      -  $ ©N©ró   r5  r£   r   r  )Úuniformr6  r7  rQ   rÃ  )rE   r—   ró   rô   ÚuÚgms         r6   rõ   Údgamma_gen._rvs   sC   € Ø× Ñ  dÐ Ð+ˆÜ�Y‰Y�q°,ˆYÐ?ˆØ”B—H’H˜Q #™X q¨"Ó-Ñ-Ð-r8   c                 ó�   • [        U5      nSS[        R                  " U5      -  -  X2S-
  -  -  [        R                  " U* 5      -  $ r7  )r  r~   r6  rQ   rÒ   ©rE   rv   r—   Úaxs       r6   rw   Údgamma_gen._pdf  s<   € ä�‹VˆØ�A”b—h’h˜q“k‘MÑ" 2¨#©¡;Ñ.´·²¸¸³Ñ<Ð<r8   c                 ó®   • [        U5      n[        R                  " US-
  U5      U-
  [        R                  " S5      -
  [        R
                  " U5      -
  $ r7  )r  r~   r¹  rQ   r  r  rÐ  s       r6   rü   Údgamma_gen._logpdf
  s?   € Ü�‹VˆÜ�xŠx˜˜C™ Ó$ rÑ)¬B¯FªF°1«IÑ5¼¿
º
À1»ÑEÐEr8   c           	      óœ   • [         R                  " US:„  SS[        R                  " X!5      -  -   S[        R                  " X!* 5      -  5      $ ©Nr   r£   )rQ   rÃ  r~   rV  rZ  r8  s      r6   r{   Údgamma_gen._cdf  sB   € Ü�xŠx˜˜A™Ø˜c¤"§+¢+¨aÓ"3Ñ3Ñ3ØœBŸLšL¨¨BÓ/Ñ/ó1ð 	1r8   c           
      óœ   • [         R                  " US:„  S[        R                  " X!5      -  SS[        R                  " X!* 5      -  -   5      $ rÖ  )rQ   rÃ  r~   rZ  rV  r8  s      r6   r€   Údgamma_gen._sf  sB   € Ü�xŠx˜˜A™ØœBŸLšL¨Ó.Ñ.Ø˜c¤"§+¢+¨a°Ó"4Ñ4Ñ4ó6ð 	6r8   c                 ón   • [         R                  R                  U5      [        R                  " S5      -
  $ ©Nr£   )rT  r6  r  rQ   r  rG  s     r6   r  Údgamma_gen._entropy  s$   € Ü�{‰{×#Ñ# AÓ&¬¯ª°«Ñ4Ð4r8   c           	      ó    • [         R                  " US:„  [        R                  " USU-  S-
  5      [        R                  " USU-  5      * 5      $ r  ©rQ   rÃ  r~   r_  rd  rA  s      r6   r†   Údgamma_gen._ppf  sD   € Ü�xŠx˜˜C™ÜŸš q¨!¨A©#°©'Ó2ÜŸš¨¨A¨a©CÓ0Ð0ó2ð 	2r8   c           	      ó    • [         R                  " US:„  [        R                  " USU-  S-
  5      * [        R                  " USU-  5      5      $ r  rÞ  rA  s      r6   rŠ   Údgamma_gen._isf   sD   € Ü�xŠx˜˜C™ÜŸš¨¨1¨Q©3°©7Ó3Ð3ÜŸš¨¨1¨Q©3Ó/ó1ð 	1r8   c                 ó:   • XS-   -  nSUSUS-   US-   -  U-  S-
  4$ )Nr•   r”   rÑ   r·  r�   )rE   r—   r~  s      r6   r   Údgamma_gen._stats%  s2   € Ø�3‘‰iˆØ�C˜˜q ™u q¨¡u™o¨cÑ1°#Ñ5Ð5Ð5r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r€   r  r†   rŠ   r   r“   r�   r8   r6   rÅ  rÅ  Ý  s;   † ñò>Eô.ò
=ò
Fò1ò
6ò
5ò2ò
1õ
6r8   rÅ  Údgammac                   óô   • \ rS rSrSr\R                  r\R                  r	\R                  r\R                  r\R                  r\R                   rS rS rS rS rSS jrS	 rS
 rS r
S rS rS rS rSrg)Údpareto_lognorm_geni-  añ  A double Pareto lognormal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `dpareto_lognorm` is:

.. math::

    f(x, \mu, \sigma, \alpha, \beta) =
    \frac{\alpha \beta}{(\alpha + \beta) x}
    \phi\left( \frac{\log x - \mu}{\sigma} \right)
    \left( R(y_1) + R(y_2) \right)

where :math:`R(t) = \frac{1 - \Phi(t)}{\phi(t)}`,
:math:`\phi` and :math:`\Phi` are the normal PDF and CDF, respectively,
:math:`y_1 = \alpha \sigma - \frac{\log x - \mu}{\sigma}`,
and :math:`y_2 = \beta \sigma + \frac{\log x - \mu}{\sigma}`
for real numbers :math:`x` and :math:`\mu`, :math:`\sigma > 0`,
:math:`\alpha > 0`, and :math:`\beta > 0` [1]_.

`dpareto_lognorm` takes
``u`` as a shape parameter for :math:`\mu`,
``s`` as a shape parameter for :math:`\sigma`,
``a`` as a shape parameter for :math:`\alpha`, and
``b`` as a shape parameter for :math:`\beta`.

A random variable :math:`X` distributed according to the PDF above
can be represented as :math:`X = U \frac{V_1}{V_2}` where :math:`U`,
:math:`V_1`, and :math:`V_2` are independent, :math:`U` is lognormally
distributed such that :math:`\log U \sim N(\mu, \sigma^2)`, and
:math:`V_1` and :math:`V_2` follow Pareto distributions with parameters
:math:`\alpha` and :math:`\beta`, respectively [2]_.

%(after_notes)s

References
----------
.. [1] Hajargasht, Gholamreza, and William E. Griffiths. "Pareto-lognormal
       distributions: Inequality, poverty, and estimation from grouped income
       data." Economic Modelling 33 (2013): 593-604.
.. [2] Reed, William J., and Murray Jorgensen. "The double Pareto-lognormal
       distribution - a new parametric model for size distributions."
       Communications in Statistics - Theory and Methods 33.8 (2004): 1733-1753.

%(example)s

c                 óH   • U R                  U5      U R                  U5      -  $ rO   )Ú_PhicÚ_phi©rE   Úzs     r6   Ú_RÚdpareto_lognorm_gen._Rf  s   € Ø�z‰z˜!‹}˜tŸy™y¨›|Ñ+Ð+r8   c                 óH   • U R                  U5      U R                  U5      -
  $ rO   )Ú_logPhicÚ_logphirê  s     r6   Ú_logRÚdpareto_lognorm_gen._logRi  s   € Ø�}‰}˜QÓ $§,¡,¨q£/Ñ1Ð1r8   c           	      ó  • [        SS[        R                  * [        R                  4S5      [        SSS[        R                  4S5      [        SSS[        R                  4S5      [        SSS[        R                  4S5      /$ )NrÌ  Fr3  rx  r   r—   r˜   rl   rn   s    r6   ro   Údpareto_lognorm_gen._shape_infol  sm   € Ü˜3 ¬¯©¨´·±Ð'8¸.ÓIÜ˜3 ¨¬2¯6©6 {°NÓCÜ˜3 ¨¬2¯6©6 {°NÓCÜ˜3 ¨¬2¯6©6 {°NÓCðEð 	Er8   c                 ó$   • US:„  US:„  -  US:„  -  $ ©Nr   r�   )rE   rÌ  rx  r—   r˜   s        r6   rf   Údpareto_lognorm_gen._argcheckr  s   € Ø�A‘˜!˜a™%Ñ  A¨¡EÑ*Ð*r8   Nc                 óž   • UR                  XUS9nUR                  US9nUR                  US9n	[        R                  " XxU-  -   X”-  -
  5      $ ©NrÊ  )ÚnormalÚstandard_exponentialrQ   rÒ   )
rE   rÌ  rx  r—   r˜   ró   rô   ÚZÚE1ÚE2s
             r6   rõ   Údpareto_lognorm_gen._rvsu  s[   € ð ×Ñ ¨4ÐÐ0ˆØ×.Ñ.°DÐ.Ð9ˆØ×.Ñ.°DÐ.Ð9ˆÜ�vŠv�a˜q™&‘j 2¡6Ñ)Ó*Ð*r8   c                 ón  • [         R                  " SSS9   [         R                  " U5      UpvXg-
  U-  nXC-  U-
  n	XS-  U-   n
[         R                  " [         R                  " U5      [         R                  " U5      -   [         R                  " XE-   5      -
  U-
  5      nX°R	                  U5      -  nU[         R
                  " U R                  U	5      U R                  U
5      5      -  nS S S 5        [         R                  * WUS:H  [         R                  " U5      -  '   US   $ ! , (       d  f       NA= f)Nrp  ©Úinvalidrr  r   r�   )	rQ   rs  r  r"  rð  Ú	logaddexprñ  rm   rX   )rE   rv   rÌ  rx  r—   r˜   Úlog_yÚmrë  Úx1Úx2rX  s               r6   rü   Údpareto_lognorm_gen._logpdf~  sæ   € Ü�[Š[ °(Ó;Ü—v’v˜a“y !�1Ø‘˜a‘ˆAØ‘˜‘ˆBØ‘˜‘ˆBÜ—*’*œRŸVšV A›Y¬¯ª°«Ñ2´R·V²V¸A¹E³]ÑBÀUÑJÓKˆCØ—<‘< “?Ñ"ˆCØ”2—<’< §
¡
¨2£°·
±
¸2³Ó?Ñ?ˆC÷ <ô (*§v¡v gˆˆQ�!‰V”r—x’x “{Ñ"Ñ#Ø�2‰wˆ÷ <Õ;ús   –CD&Ä&
D4c           	      óâ  • [         R                  " SSS9   [         R                  " U5      UpvXg-
  U-  nXC-  U-
  n	XS-  U-   n
U R                  U5      nU R	                  U5      n[         R                  " U5      U R                  U	5      -   n[         R                  " U5      U R                  U
5      -   n[         R                  " X¼XÞS5      u  p¼pÞn[        R                  " XÞ/Xÿ* /SSS9u  nnX¼U-   [         R                  " XE-   5      -
  /n[         R                  " [        R                  " UXÿ* U-  /SS95      nS S S 5        [         R                  * WUS:H  '   US   $ ! , (       d  f       N*= f)	Nrp  r  r   r   T)r˜   r^  Úreturn_sign)r˜   r^  r�   )rQ   rs  r  Ú_logPhirð  rñ  rS  r~   Ú	logsumexpr"  rm   )rE   rv   rÌ  rx  r—   r˜   r  r  rë  r  r  r  r  r  Út4ÚoneÚt5rR   ÚtemprX  s                       r6   r  Údpareto_lognorm_gen._logcdfŠ  s5  € Ü�[Š[ °(Ó;Ü—v’v˜a“y !�1Ø‘˜a‘ˆAØ‘˜‘ˆBØ‘˜‘ˆBØ—‘˜a“ˆBØ—‘˜a“ˆBÜ—&’&˜“)˜dŸj™j¨›nÑ,ˆBÜ—&’&˜“)˜dŸj™j¨›nÑ,ˆBÜ"$×"5Ò"5°b¸bÀaÓ"HÑˆB�B˜Cô Ÿš b X°#°t°À1ÐRVÑW‰HˆB�Ø˜R™¤"§&¢&¨©£-Ñ/Ð0ˆDÜ—*’*œRŸ\š\¨$°3¸¸T¹	Ð2BÈÑKÓLˆC÷ <ô  —v‘v�gˆˆA�‰F‰Ø�2‰wˆ÷# <Õ;ús   –D&E Å 
E.c           	      óP   • [         R                  " U R                  XX4U5      5      $ rO   )rs   Ú	_log1mexpr  ©rE   rv   rÌ  rx  r—   r˜   s         r6   r	  Údpareto_lognorm_gen._logsfž  s   € Ü�}Š}˜TŸ\™\¨!°°aÓ8Ó9Ð9r8   c           	      óP   • [         R                  " U R                  XX4U5      5      $ rO   r<  r  s         r6   rw   Údpareto_lognorm_gen._pdf£  ó   € Ü�vŠv�d—l‘l 1¨¨qÓ1Ó2Ð2r8   c           	      óP   • [         R                  " U R                  XX4U5      5      $ rO   ©rQ   rÒ   r  r  s         r6   r{   Údpareto_lognorm_gen._cdf¦  r  r8   c           	      óP   • [         R                  " U R                  XX4U5      5      $ rO   r¥  r  s         r6   r€   Údpareto_lognorm_gen._sf©  s   € Ü�vŠv�d—k‘k !¨¨aÓ0Ó1Ð1r8   c                 óà   • U[        U5      pvXE-  XG-
  XW-   -  -  [        R                  " Xv-  US-  US-  -  S-  -   5      -  n[        R                  " U5      n[        R                  X„U:*  '   U$ rD  )ÚfloatrQ   rÒ   r"  rF  )	rE   re   rÌ  rx  r—   r˜   r  rz  rX  s	            r6   r+  Údpareto_lognorm_gen._munp¬  si   € Ø”%˜“(ˆ1Ø‰u˜!™% A¡EÑ*Ñ+¬b¯fªf°Q±U¸QÀ!¹VÀaÈ1Áf¹_ÈqÑ=PÑ5PÓ.QÑQˆÜ�jŠj˜‹oˆÜ—f‘fˆ�‰F‰Øˆ
r8   r�   r-  )rŽ   r�   r�   r‘   r’   r.  rü   rð  r  r  r	  rï  rw   ré  r{   Ú_Phir€   rè  rì  rñ  ro   rf   rõ   r+  r“   r�   r8   r6   ræ  ræ  -  s}   † ñ0ðb �l‰l€GØ�l‰l€GØ�{‰{€HØ�9‰9€DØ�9‰9€DØ�H‰H€Eò,ò2òEò+ô+ò
òò(:ò
3ò3ò2õr8   ræ  Údpareto_lognormc                   ó^   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rS rSrg)Údweibull_geni·  aJ  A double Weibull continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `dweibull` is given by

.. math::

    f(x, c) = c / 2 |x|^{c-1} \exp(-|x|^c)

for a real number :math:`x` and :math:`c > 0`.

`dweibull` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Údweibull_gen._shape_infoÍ  r5  r8   Nc                 ó„   • UR                  US9n[        R                  XUS9nU[        R                  " US:¬  SS5      -  $ rÉ  )rË  Úweibull_minr7  rQ   rÃ  )rE   rj  ró   rô   rÌ  Úws         r6   rõ   Údweibull_gen._rvsÐ  sC   € Ø× Ñ  dÐ Ð+ˆÜ�O‰O˜A°|ˆOÐDˆØ”B—H’H˜Q #™X q¨"Ó-Ñ.Ð.r8   c                 ój   • [        U5      nUS-  X2S-
  -  -  [        R                  " X2-  * 5      -  nU$ ©NrÑ   r•   )r  rQ   rÒ   )rE   rv   rj  rÑ  ÚPxs        r6   rw   Údweibull_gen._pdfÕ  s5   € ä�‹VˆØ�‰W�r˜c™E‘{Ñ"¤R§V¢V¨R©U¨F£^Ñ3ˆØˆ	r8   c                 ó²   • [        U5      n[        R                  " U5      [        R                  " S5      -
  [        R                  " US-
  U5      -   X2-  -
  $ r,  )r  rQ   r  r~   r¹  )rE   rv   rj  rÑ  s       r6   rü   Údweibull_gen._logpdfÛ  sA   € Ü�‹VˆÜ�vŠv�a‹yœ2Ÿ6š6 #›;Ñ&¬¯ª°!°c±'¸2Ó)>Ñ>ÀÁÑFÐFr8   c                 óŠ   • S[         R                  " [        U5      U-  * 5      -  n[         R                  " US:„  SU-
  U5      $ ©Nr£   r   r   )rQ   rÒ   r  rÃ  )rE   rv   rj  ÚCx1s       r6   r{   Údweibull_gen._cdfß  s:   € Ø”B—F’FœC ›F A™I˜:Ó&Ñ&ˆÜ�xŠx˜˜A™˜q 3™w¨Ó,Ð,r8   c                 óØ   • S[         R                  " US:*  USU-
  5      -  n[         R                  " [         R                  " U5      * SU-  5      n[         R                  " US:„  X3* 5      $ ©NrÑ   r£   r•   )rQ   rÃ  ri  r  )rE   r…   rj  rô  s       r6   r†   Údweibull_gen._ppfã  sV   € Ø”2—8’8˜A ™H a¨¨a©Ó0Ñ0ˆÜ�hŠhœŸš˜s›�| S¨1¡WÓ-ˆÜ�xŠx˜˜C™  dÓ+Ð+r8   c                 ó¬   • S[         R                  R                  [        R                  " U5      U5      -  n[        R
                  " US:„  USU-
  5      $ r2  )rT  r(  r€   rQ   r  rÃ  )rE   rv   rj  Úhalf_weibull_min_sfs       r6   r€   Údweibull_gen._sfè  sF   € Ø!¤E×$5Ñ$5×$9Ñ$9¼"¿&º&À»)ÀQÓ$GÑGÐÜ�xŠx˜˜A™Ð2°AÐ8KÑ4KÓLÐLr8   c                 óº   • S[         R                  " US:*  USU-
  5      -  n[        R                  R	                  X25      n[         R                  " US:„  U* U5      $ r6  )rQ   rÃ  rT  r(  rŠ   )rE   r…   rj  Údouble_qÚweibull_min_isfs        r6   rŠ   Údweibull_gen._isfì  sQ   € ØœŸš  c¡¨1¨b°1©fÓ5Ñ5ˆÜ×+Ñ+×0Ñ0°Ó=ˆÜ�xŠx˜˜C™ /Ð!1°?ÓCÐCr8   c                 óR   • SUS-  -
  [         R                  " SSU-  U-  -   5      -  $ )Nr   rW   r•   ©r~   r6  r  s      r6   r+  Údweibull_gen._munpñ  s+   € Ø�Q˜‘U‘œrŸxšx¨¨c°A©g¸©kÑ(9Ó:Ñ:Ð:r8   c                 ó   • g©N)r   Nr   Nr�   r	  s     r6   r   Údweibull_gen._stats÷  ó   € Ør8   c                 ór   • [         R                  R                  U5      [        R                  " S5      -
  nU$ rÛ  )rT  r(  r  rQ   r  )rE   rj  rž  s      r6   r  Údweibull_gen._entropyú  s*   € Ü×Ñ×&Ñ& qÓ)¬B¯FªF°3«KÑ7ˆØˆr8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r†   r€   rŠ   r+  r   r  r“   r�   r8   r6   r$  r$  ·  sB   † ñò*Eô/ò
òGò-ò,ò
MòDò
;ò õr8   r$  Údweibullc                   ó‚   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rS r\\" \SS9S 5       5       rSrg)Ú	expon_geni  a	  An exponential continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `expon` is:

.. math::

    f(x) = \exp(-x)

for :math:`x \ge 0`.

%(after_notes)s

A common parameterization for `expon` is in terms of the rate parameter
``lambda``, such that ``pdf = lambda * exp(-lambda * x)``. This
parameterization corresponds to using ``scale = 1 / lambda``.

The exponential distribution is a special case of the gamma
distributions, with gamma shape parameter ``a = 1``.

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úexpon_gen._shape_info  r¼   r8   Nc                 ó$   • UR                  U5      $ rO   )rû  rò   s      r6   rõ   Úexpon_gen._rvs   s   € Ø×0Ñ0°Ó6Ð6r8   c                 ó0   • [         R                  " U* 5      $ rO   ©rQ   rÒ   r¿   s     r6   rw   Úexpon_gen._pdf#  s   € ä�vŠv�q�b‹zÐr8   c                 ó   • U* $ rO   r�   r¿   s     r6   rü   Úexpon_gen._logpdf'  ó	   € Øˆrˆ	r8   c                 ó2   • [         R                  " U* 5      * $ rO   ©r~   rt  r¿   s     r6   r{   Úexpon_gen._cdf*  ó   € Ü—’˜!˜“ˆ}Ðr8   c                 ó2   • [         R                  " U* 5      * $ rO   rm  rÉ   s     r6   r†   Úexpon_gen._ppf-  rX  r8   c                 ó0   • [         R                  " U* 5      $ rO   rP  r¿   s     r6   r€   Úexpon_gen._sf0  s   € Ü�vŠv�q�b‹zÐr8   c                 ó   • U* $ rO   r�   r¿   s     r6   r	  Úexpon_gen._logsf3  rT  r8   c                 ó0   • [         R                  " U5      * $ rO   rg  rÉ   s     r6   rŠ   Úexpon_gen._isf6  ó   € Ü—’�q“	ˆzÐr8   c                 ó   • g)N)r•   r•   rÑ   ç      @r�   rn   s    r6   r   Úexpon_gen._stats9  r  r8   c                 ó   • gr>  r�   rn   s    r6   r  Úexpon_gen._entropy<  ó   € Ør8   zú        When `method='MLE'`,
        this function uses explicit formulas for the maximum likelihood
        estimation of the exponential distribution parameters, so the
        `optimizer`, `loc` and `scale` keyword arguments are
        ignored.

r  c                 ó  • [        U5      S:”  a  [        S5      eUR                  SS 5      nUR                  SS 5      n[        U5        Ub  Ub  [	        S5      e[
        R                  " U5      n[
        R                  " U5      R                  5       (       d  [	        S5      eUR                  5       nUc  UnO UnXg:  a  [        SU[
        R                  S9eUc  UR                  5       U-
  nOUn[        U5      [        U5      4$ )	Nr   úToo many arguments.r  r  r  r   Úexponrè  )rí  r4   r3   r7   r!  rQ   r"  r#  r$  Úminr‡  rm   r%  r  )	rE   rF   rG   r5   r  r  Údata_minr.   r/   s	            r6   rC   Úexpon_gen.fit?  sõ   € ô ˆt‹9�q‹=ÜÐ1Ó2Ð2à�x‰x˜ Ó%ˆØ—‘˜( DÓ)ˆä$ TÔ*àÑ Ñ 2äð )ó *ð *ô �zŠz˜$Óˆä�{Š{˜4Ó ×$Ñ$×&Ñ&ÜÐCÓDÐDà—8‘8“:ˆà‰<à‰CàˆCØ‹~ä" 7°$¼b¿f¹fÑEÐEà‰>à—I‘I“K #Ñ%‰EàˆEô �S‹zœ5 ›<Ð'Ð'r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r†   r€   r	  rŠ   r   r  rL   r
   r   rC   r“   r�   r8   r6   rJ  rJ    sf   † ñò4ô7òòòòòòòò"òð Ù ð 6ñ ñ&(óó ó&(r8   rJ  rj  c                   óF   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rSrg)Úexponnorm_genir  a€  An exponentially modified Normal continuous random variable.

Also known as the exponentially modified Gaussian distribution [1]_.

%(before_notes)s

Notes
-----
The probability density function for `exponnorm` is:

.. math::

    f(x, K) = \frac{1}{2K} \exp\left(\frac{1}{2 K^2} - x / K \right)
              \text{erfc}\left(-\frac{x - 1/K}{\sqrt{2}}\right)

where :math:`x` is a real number and :math:`K > 0`.

It can be thought of as the sum of a standard normal random variable
and an independent exponentially distributed random variable with rate
``1/K``.

%(after_notes)s

An alternative parameterization of this distribution (for example, in
the Wikipedia article [1]_) involves three parameters, :math:`\mu`,
:math:`\lambda` and :math:`\sigma`.

In the present parameterization this corresponds to having ``loc`` and
``scale`` equal to :math:`\mu` and :math:`\sigma`, respectively, and
shape parameter :math:`K = 1/(\sigma\lambda)`.

.. versionadded:: 0.16.0

References
----------
.. [1] Exponentially modified Gaussian distribution, Wikipedia,
       https://en.wikipedia.org/wiki/Exponentially_modified_Gaussian_distribution

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ )NÚKFr   r3  rl   rn   s    r6   ro   Úexponnorm_gen._shape_infoœ  r5  r8   Nc                 óT   • UR                  U5      U-  nUR                  U5      nXE-   $ rO   )rû  rñ   )rE   rq  ró   rô   ÚexpvalÚgvals         r6   rõ   Úexponnorm_gen._rvsŸ  s/   € Ø×2Ñ2°4Ó8¸1Ñ<ˆØ×+Ñ+¨DÓ1ˆØ‰}Ðr8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  )rE   rv   rq  s      r6   rw   Úexponnorm_gen._pdf¤  ó   € Ü�vŠv�d—l‘l 1Ó(Ó)Ð)r8   c                 óp   • SU-  nUSU-  U-
  -  nU[        X-
  5      -   [        R                  " U5      -
  $ ©Nr•   r£   ©rÞ   rQ   r  )rE   rv   rq  ÚinvKÚexpargs        r6   rü   Úexponnorm_gen._logpdf§  s<   € Ø�Q‰wˆØ˜˜t™ a™Ñ(ˆØœ Q¡XÓ.Ñ.´·²¸³Ñ:Ð:r8   c                 ó†   • SU-  nUSU-  U-
  -  nU[        X-
  5      -   n[        U5      [        R                  " U5      -
  $ r{  ©rÞ   rÛ   rQ   rÒ   ©rE   rv   rq  r}  rt  Úlogprods         r6   r{   Úexponnorm_gen._cdf¬  sE   € Ø�Q‰wˆØ˜˜t™ a™Ñ(ˆØœ<¨©Ó1Ñ1ˆÜ˜‹|œbŸfšf W›oÑ-Ð-r8   c                 óˆ   • SU-  nUSU-  U-
  -  nU[        X-
  5      -   n[        U* 5      [        R                  " U5      -   $ r{  r�  r‚  s         r6   r€   Úexponnorm_gen._sf²  sG   € Ø�Q‰wˆØ˜˜t™ a™Ñ(ˆØœ<¨©Ó1Ñ1ˆÜ˜!˜‹}œrŸvšv g›Ñ.Ð.r8   c                 óT   • X-  nSU-   nSUS-  -  US-  -  nSU-  U-  US-  -  nXXE4$ )Nr•   rW   rÌ  r{  rc  r;  r�   )rE   rq  ÚK2ÚopK2ÚskwÚkrts         r6   r   Úexponnorm_gen._stats¸  sI   € Ø‰UˆØ�R‰xˆØ�!�Q‘$‰h˜ ™Ñ%ˆØ�B‰h˜‰m˜d R™jÑ(ˆØ˜Ð Ð r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r€   r   r“   r�   r8   r6   ro  ro  r  s,   † ñ(òREôò
*ò;ò
.ò/õ!r8   ro  Ú	exponnormc                 óV   • [         R                  " [        R                  " X5      5      $ )a  
Compute (1 + x)**y - 1.

Uses expm1 and xlog1py to avoid loss of precision when
(1 + x)**y is close to 1.

Note that the inverse of this function with respect to x is
``_pow1pm1(x, 1/y)``.  That is, if

    t = _pow1pm1(x, y)

then

    x = _pow1pm1(t, 1/y)
)rQ   rt  r~   r¸  ©rv   Úys     r6   Ú_pow1pm1r‘  Ã  s   € ô  �8Š8”B—J’J˜qÓ$Ó%Ð%r8   c                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)Úexponweib_geniÖ  a@  An exponentiated Weibull continuous random variable.

%(before_notes)s

See Also
--------
weibull_min, numpy.random.Generator.weibull

Notes
-----
The probability density function for `exponweib` is:

.. math::

    f(x, a, c) = a c [1-\exp(-x^c)]^{a-1} \exp(-x^c) x^{c-1}

and its cumulative distribution function is:

.. math::

    F(x, a, c) = [1-\exp(-x^c)]^a

for :math:`x > 0`, :math:`a > 0`, :math:`c > 0`.

`exponweib` takes :math:`a` and :math:`c` as shape parameters:

* :math:`a` is the exponentiation parameter,
  with the special case :math:`a=1` corresponding to the
  (non-exponentiated) Weibull distribution `weibull_min`.
* :math:`c` is the shape parameter of the non-exponentiated Weibull law.

%(after_notes)s

References
----------
https://en.wikipedia.org/wiki/Exponentiated_Weibull_distribution

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ ©Nr—   Fr   r3  rj  rl   ©rE   r§  rŠ  s      r6   ro   Úexponweib_gen._shape_infoÿ  rª  r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  ©rE   rv   r—   rj  s       r6   rw   Úexponweib_gen._pdf	  ó   € ô �vŠv�d—l‘l 1¨Ó+Ó,Ð,r8   c                 ó
  • X-  * n[         R                  " U5      * n[        R                  " U5      [        R                  " U5      -   [         R                  " US-
  U5      -   U-   [         R                  " US-
  U5      -   nU$ r>  )r~   rt  rQ   r  r¹  )rE   rv   r—   rj  ÚnegxcÚexm1cÚlogps          r6   rü   Úexponweib_gen._logpdf		  sm   € Ø‘�ˆÜ—’˜%“Ð ˆÜ—’�q“	œBŸFšF 1›IÑ%¬¯ª°°S±¸%Ó(@Ñ@ØñÜŸš  S¡¨!Ó,ñ-ˆàˆr8   c                 ó>   • [         R                  " X-  * 5      * nXB-  $ rO   rV  )rE   rv   r—   rj  rž  s        r6   r{   Úexponweib_gen._cdf	  s   € Ü—’˜1™4˜%“Ð ˆØ‰xˆr8   c                 ór   • [         R                  " USU-  -  * 5      * [        R                  " SU-  5      -  $ r>  )r~   rï  rQ   r"  )rE   r…   r—   rj  s       r6   r†   Úexponweib_gen._ppf	  s0   € Ü—’˜1˜s 1™u™:˜+Ó&Ð&¬¯ª°C¸±EÓ):Ñ:Ð:r8   c                 óL   • [        [        R                  " X-  * 5      * U5      * $ rO   )r‘  rQ   rÒ   r™  s       r6   r€   Úexponweib_gen._sf	  s    € Üœ"Ÿ&š& !¡$ ›-˜¨Ó+Ð+Ð+r8   c                 óZ   • [         R                  " [        U* SU-  5      * 5      * SU-  -  $ ra   )rQ   r  r‘  )rE   rV  r—   rj  s       r6   rŠ   Úexponweib_gen._isf	  s-   € Ü—’œ 1 " a¨¡cÓ*Ð*Ó+Ð+¨q°©sÑ3Ð3r8   r�   N©rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   rŠ   r“   r�   r8   r6   r“  r“  Ö  s+   † ñ'òPò
-ò
òò;ò,õ4r8   r“  Ú	exponweibc                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)Úexponpow_geni!	  aC  An exponential power continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `exponpow` is:

.. math::

    f(x, b) = b x^{b-1} \exp(1 + x^b - \exp(x^b))

for :math:`x \ge 0`, :math:`b > 0`.  Note that this is a different
distribution from the exponential power distribution that is also known
under the names "generalized normal" or "generalized Gaussian".

`exponpow` takes ``b`` as a shape parameter for :math:`b`.

%(after_notes)s

References
----------
http://www.math.wm.edu/~leemis/chart/UDR/PDFs/Exponentialpower.pdf

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ©Nr˜   Fr   r3  rl   rn   s    r6   ro   Úexponpow_gen._shape_info=	  r5  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  ©rE   rv   r˜   s      r6   rw   Úexponpow_gen._pdf@	  ó   € ä�vŠv�d—l‘l 1Ó(Ó)Ð)r8   c                 óª   • X-  nS[         R                  " U5      -   [        R                  " US-
  U5      -   U-   [         R                  " U5      -
  nU$ ©Nr   r•   )rQ   r  r~   r¹  rÒ   )rE   rv   r˜   ÚxbÚfs        r6   rü   Úexponpow_gen._logpdfD	  sE   € Ø‰TˆØ”—’�q“	‰MœBŸHšH Q¨¡W¨aÓ0Ñ0°2Ñ5¼¿º¸r»
ÑBˆØˆr8   c                 ó^   • [         R                  " [         R                  " X-  5      * 5      * $ rO   rV  r±  s      r6   r{   Úexponpow_gen._cdfI	  s    € Ü—’œ"Ÿ(š( 1¡4›.˜Ó)Ð)Ð)r8   c                 ó\   • [         R                  " [        R                  " X-  5      * 5      $ rO   ©rQ   rÒ   r~   rt  r±  s      r6   r€   Úexponpow_gen._sfL	  s   € Ü�vŠv”r—x’x ¡“~�oÓ&Ð&r8   c                 ód   • [         R                  " [        R                  " U5      * 5      SU-  -  $ r>  ©r~   rï  rQ   r  r±  s      r6   rŠ   Úexponpow_gen._isfO	  s$   € Ü—’œ"Ÿ&š& ›)˜Ó$¨¨1©Ñ-Ð-r8   c                 ót   • [        [        R                  " [        R                  " U* 5      * 5      SU-  5      $ r>  ©Úpowr~   rï  ©rE   r…   r˜   s      r6   r†   Úexponpow_gen._ppfR	  s(   € Ü”2—8’8œRŸXšX q b›\˜MÓ*¨C°©EÓ2Ð2r8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r€   rŠ   r†   r“   r�   r8   r6   r¬  r¬  !	  s+   † ñò6Eò*òò
*ò'ò.õ3r8   r¬  Úexponpowc                   ój   • \ rS rSrSr\R                  rS rSS jr	S r
S rS rS	 rS
 rS rS rSrg)Úfatiguelife_geniY	  aô  A fatigue-life (Birnbaum-Saunders) continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `fatiguelife` is:

.. math::

    f(x, c) = \frac{x+1}{2c\sqrt{2\pi x^3}} \exp(-\frac{(x-1)^2}{2x c^2})

for :math:`x >= 0` and :math:`c > 0`.

`fatiguelife` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

References
----------
.. [1] "Birnbaum-Saunders distribution",
       https://en.wikipedia.org/wiki/Birnbaum-Saunders_distribution

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úfatiguelife_gen._shape_infov	  r5  r8   Nc                 ó�   • UR                  U5      nSU-  U-  nXU-  nSSU-  -   SU-  [        R                  " SU-   5      -  -   nU$ )Nr£   r•   rW   r   )rñ   rQ   r&  )rE   rj  ró   rô   rë  rv   r  Úts           r6   rõ   Úfatiguelife_gen._rvsy	  sR   € Ø×(Ñ(¨Ó.ˆØ�‰E�!‰GˆØ‰SˆØ�!�B‘$‰J˜˜1™œRŸWšW Q¨¡V›_Ñ,Ñ,ˆØˆr8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rn  s      r6   rw   Úfatiguelife_gen._pdf€	  s   € ô �vŠv�d—l‘l 1Ó(Ó)Ð)r8   c                 ó  • [         R                  " US-   5      US-
  S-  SU-  US-  -  -  -
  [         R                  " SU-  5      -
  S[         R                  " S[         R                  -  5      S[         R                  " U5      -  -   -  -
  $ )Nr   rW   rÑ   r£   rÌ  r  rn  s      r6   rü   Úfatiguelife_gen._logpdf…	  ss   € Ü—’�q˜‘s“˜q ™s Q™h¨#¨a©%°°1±©*Ñ5Ñ5¼¿º¸qÀ¹s»ÑCØ”R—V’V˜AœbŸe™e™G“_ q¬¯ª°«¡{Ñ2Ñ3ñ4ð 	5r8   c                 ó€   • [        SU-  [        R                  " U5      S[        R                  " U5      -  -
  -  5      $ r>  )rÛ   rQ   r&  rn  s      r6   r{   Úfatiguelife_gen._cdf‰	  s/   € Ü˜˜q™¤B§G¢G¨A£J°´R·W²W¸Q³Z±Ñ$?Ñ@ÓAÐAr8   c                 óh   • U[        U5      -  nSU[        R                  " US-  S-   5      -   S-  -  $ ©Nç      Ð?rW   rU  ©râ   rQ   r&  ©rE   r…   rj  Útmps       r6   r†   Úfatiguelife_gen._ppfŒ	  s6   € Ø”)˜A“,ÑˆØ�sœRŸWšW S¨!¡V¨a¡ZÓ0Ñ0°1Ñ4Ñ4Ð4r8   c                 ó€   • [        SU-  [        R                  " U5      S[        R                  " U5      -  -
  -  5      $ r>  )rå   rQ   r&  rn  s      r6   r€   Úfatiguelife_gen._sf�	  s/   € Ü˜˜a™¤2§7¢7¨1£:°´B·G²G¸A³J±Ñ#>Ñ?Ó@Ð@r8   c                 ój   • U* [        U5      -  nSU[        R                  " US-  S-   5      -   S-  -  $ rÕ  r×  rØ  s       r6   rŠ   Úfatiguelife_gen._isf“	  s8   € Øˆb”9˜Q“<ÑˆØ�sœRŸWšW S¨!¡V¨a¡ZÓ0Ñ0°1Ñ4Ñ4Ð4r8   c                 ó´   • X-  nUS-  S-   nSU-  S-   nX$-  S-  nSU-  SU-  S-   -  [         R                  " US5      -  nS	U-  S
U-  S-   -  US-  -  nX5Xg4$ )NrÑ   r•   r¾  r¾  rU  é   rc  rg  rË  é]   g      D@©rQ   ri  )rE   rj  Úc2r}  Údenr~  r  r€  s           r6   r   Úfatiguelife_gen._stats—	  s   € ð ‰SˆØ�#‰X˜‰^ˆØ�B‰h˜‰nˆØ‰f�s‰lˆØ�‰U�b˜‘e˜c‘kÑ"¤R§X¢X¨c°3Ó%7Ñ7ˆØ�‰V�r˜"‘u˜t‘|Ñ$ s¨C¡xÑ/ˆØ˜ˆÐr8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rõ   rw   rü   r{   r†   r€   rŠ   r   r“   r�   r8   r6   rÈ  rÈ  Y	  sD   † ñð4 "×4Ñ4€MòEôò*ò
5òBò5òAò5õr8   rÈ  Úfatiguelifec                   óF   • \ rS rSrSrS rS rSS jrS rS r	S	 r
S
 rSrg)Úfoldcauchy_geni©	  aG  A folded Cauchy continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `foldcauchy` is:

.. math::

    f(x, c) = \frac{1}{\pi (1+(x-c)^2)} + \frac{1}{\pi (1+(x+c)^2)}

for :math:`x \ge 0` and :math:`c \ge 0`.

`foldcauchy` takes ``c`` as a shape parameter for :math:`c`.

%(example)s

c                 ó   • US:¬  $ rö  r�   r	  s     r6   rf   Úfoldcauchy_gen._argcheck½	  ó   € Ø�A‰vˆr8   c                 ó@   • [        SSS[        R                  4S5      /$ ©Nrj  Fr   rk   rl   rn   s    r6   ro   Úfoldcauchy_gen._shape_infoÀ	  ó   € Ü˜3 ¨¬2¯6©6 {°MÓBÐCÐCr8   Nc                 ó<   • [        [        R                  XUS95      $ )N©r.   ró   rô   )r  rA  r7  ©rE   rj  ró   rô   s       r6   rõ   Úfoldcauchy_gen._rvsÃ	  s$   € Ü”6—:‘: !Ø+7ð ð 9ó :ð 	:r8   c                 ó`   • S[         R                  -  SSX-
  S-  -   -  SSX-   S-  -   -  -   -  $ ©Nr•   r   rW   rc  rn  s      r6   rw   Úfoldcauchy_gen._pdfÇ	  s8   € à”2—5‘5‰y˜#˜q !¡#¨¡™zÑ*¨S°!°Q±S¸1±H±*Ñ-=Ñ=Ñ>Ð>r8   c                 óŒ   • S[         R                  -  [         R                  " X-
  5      [         R                  " X-   5      -   -  $ r>  ©rQ   r  Úarctanrn  s      r6   r{   Úfoldcauchy_gen._cdfË	  s.   € Ø”2—5‘5‰yœ"Ÿ)š) A¡C›.¬2¯9ª9°Q±S«>Ñ9Ñ:Ð:r8   c                 óŠ   • [         R                  " SX-
  5      [         R                  " SX-   5      -   [         R                  -  $ ra   r  rn  s      r6   r€   Úfoldcauchy_gen._sfÎ	  s2   € ô
 —
’
˜1˜a™eÓ$¤r§z¢z°!°Q±UÓ';Ñ;¼R¿U¹UÑBÐBr8   c                 ó~   • [         R                  [         R                  [         R                  [         R                  4$ rO   rE  r	  s     r6   r   Úfoldcauchy_gen._statsÕ	  r/  r8   r�   r-  ©rŽ   r�   r�   r‘   r’   rf   ro   rõ   rw   r{   r€   r   r“   r�   r8   r6   rè  rè  ©	  s,   † ñò&òDô:ò?ò;òCõ.r8   rè  Ú
foldcauchyc                   óR   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rSrg)Úf_geniÜ	  a�  An F continuous random variable.

For the noncentral F distribution, see `ncf`.

%(before_notes)s

See Also
--------
ncf

Notes
-----
The F distribution with :math:`df_1 > 0` and :math:`df_2 > 0` degrees of freedom is
the distribution of the ratio of two independent chi-squared distributions with
:math:`df_1` and :math:`df_2` degrees of freedom, after rescaling by
:math:`df_2 / df_1`.

The probability density function for `f` is:

.. math::

    f(x, df_1, df_2) = \frac{df_2^{df_2/2} df_1^{df_1/2} x^{df_1 / 2-1}}
                            {(df_2+df_1 x)^{(df_1+df_2)/2}
                             B(df_1/2, df_2/2)}

for :math:`x > 0`.

`f` accepts shape parameters ``dfn`` and ``dfd`` for :math:`df_1`, the degrees of
freedom of the chi-squared distribution in the numerator, and :math:`df_2`, the
degrees of freedom of the chi-squared distribution in the denominator, respectively.

%(after_notes)s

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ )NÚdfnFr   r3  Údfdrl   )rE   ÚidfnÚidfds      r6   ro   Úf_gen._shape_info
  s:   € Ü˜% ¨¬B¯F©F¨°^ÓDˆÜ˜% ¨¬B¯F©F¨°^ÓDˆØˆ|Ðr8   Nc                 ó&   • UR                  XU5      $ rO   )r·  )rE   r  r  ró   rô   s        r6   rõ   Ú
f_gen._rvs
  s   € Ø�~‰~˜c¨Ó-Ð-r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  ©rE   rv   r  r  s       r6   rw   Ú
f_gen._pdf	
  s   € ô �vŠv�d—l‘l 1¨3Ó/Ó0Ð0r8   c                 óL  • SU-  nSU-  nUS-  [         R                  " U5      -  US-  [         R                  " U5      -  -   [        R                  " US-  S-
  U5      -   XE-   S-  [         R                  " XTU-  -   5      -  [        R                  " US-  US-  5      -   -
  nU$ ©Nr•   rW   r   )rQ   r  r~   r¹  rº  )rE   rv   r  r  re   r  r»  s          r6   rü   Úf_gen._logpdf
  s•   € Ø�#‰IˆØ�#‰IˆØ�‰s”R—V’V˜A“Y‰  1¡¤r§v¢v¨a£y¡Ñ0´2·8²8¸A¸a¹CÀ!¹GÀQÓ3GÑGØ‘C˜‘7œbŸfšf Q¨1©¡W›oÑ-´·	²	¸!¸A¹#¸qÀ¹sÓ0CÑCñEˆàˆ
r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   Úfdtrr  s       r6   r{   Ú
f_gen._cdf
  s   € Ü�wŠw�s Ó#Ð#r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   Úfdtrcr  s       r6   r€   Ú	f_gen._sf
  ó   € Ü�xŠx˜ !Ó$Ð$r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   Úfdtri)rE   r…   r  r  s       r6   r†   Ú
f_gen._ppf
  r  r8   c                 óØ  • SU-  SU-  pCUS-
  US-
  US-
  US-
  4u  pVpx[         R                  " US:„  XE4S [        R                  S9n	[         R                  " US	:„  X4XV4S
 [        R                  S9n
[         R                  " US:„  X5Xg4S [        R                  S9nU[        R
                  " S5      -  n[         R                  " US:„  X·U4S [        R                  S9nUS-  nXšX¼4$ )Nr•   rÑ   r¾  rc  ç       @rW   c                 ó
   • X-  $ rO   r�   )Úv2Úv2_2s     r6   r  Úf_gen._stats.<locals>.<lambda>%
  s   € ˜RšYr8   r  rU  c                 ó2   • SU-  U-  X-   -  XS-  -  U-  -  $ rD  r�   )Úv1r  r  Úv2_4s       r6   r  r   *
  s$   € Ø�‰F�R‰K˜2™9Ñ%¨°A©g©¸Ñ)<Ò=r8   rË  c                 óT   • SU -  U-   U-  [         R                  " X X-   -  -  5      -  $ rD  rÍ  )r"  r  r#  Úv2_6s       r6   r  r   0
  s*   € Ø�‰V�d‰]˜dÑ"¤R§W¢W¨T¸2¹9Ñ5EÑ-FÓ%GÒGr8   rb  c                 ó   • SX -  U-  -   U-  $ )Nrb  r�   )r  r%  Úv2_8s      r6   r  r   7
  s   €  A¨©°$©Ñ$6¸$Ò#>r8   rg  )r#  r$  rQ   rm   rF  r&  )rE   r  r  r"  r  r  r#  r%  r'  r}  r~  r  r€  s                r6   r   Úf_gen._stats
  sû   € Ø�c‘˜2 ™8ˆBØ!# b¡¨"¨r©'°2¸±7¸BÀ¹GÐ!CÑˆ�Dä�_Š_Ø�‰F�R�JÙ&Ü—v‘vñˆô
 �oŠoØ�‰F�R˜TÐ(ñ>ä—v‘vñ	ˆô �_Š_Ø�‰F�R˜tÐ*ñHä—v‘vñ	ˆð
 	Œb�gŠg�b‹kÑˆä�_Š_Ø�‰F�R˜tÐ$Ù>Ü—v‘vñˆð 	ˆg‰ˆà˜ˆÐr8   c                 óT  • SU-  nSU-  nSX-   -  n[         R                  " U5      [         R                  " U5      -
  [        R                  " X45      -   SU-
  [        R                  " U5      -  -   SU-   [        R                  " U5      -  -
  U[        R                  " U5      -  -   $ r§  )rQ   r  r~   rº  r™  )rE   r  r  Úhalf_dfnÚhalf_dfdÚhalf_sums         r6   r  Úf_gen._entropy=
  s›   € ð ˜‘9ˆØ˜‘9ˆØ˜#™)Ñ$ˆä—’�s“œbŸfšf S›kÑ)¬B¯IªI°hÓ,IÑIØ�X‘¤§¢¨Ó!1Ñ1ñ2Ø56¸±\Ü—’�xÓ ñ5!ñ!à#+¬b¯fªf°XÓ.>Ñ#>ñ?ð 	@r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r€   r†   r   r  r“   r�   r8   r6   r  r  Ü	  s6   † ñ#òHô
.ò1òò$ò%ò%òõ<
@r8   r  r·  c                   óF   • \ rS rSrSrS rS rSS jrS rS r	S	 r
S
 rSrg)Úfoldnorm_geniU
  aN  A folded normal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `foldnorm` is:

.. math::

    f(x, c) = \sqrt{2/\pi} cosh(c x) \exp(-\frac{x^2+c^2}{2})

for :math:`x \ge 0` and :math:`c \ge 0`.

`foldnorm` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó   • US:¬  $ rö  r�   r	  s     r6   rf   Úfoldnorm_gen._argcheckk
  rë  r8   c                 ó@   • [        SSS[        R                  4S5      /$ rí  rl   rn   s    r6   ro   Úfoldnorm_gen._shape_infon
  rï  r8   Nc                 ó<   • [        UR                  U5      U-   5      $ rO   ©r  rñ   rò  s       r6   rõ   Úfoldnorm_gen._rvsq
  s   € Ü�<×/Ñ/°Ó5¸Ñ9Ó:Ð:r8   c                 ó8   • [        X-   5      [        X-
  5      -   $ rO   rø   rn  s      r6   rw   Úfoldnorm_gen._pdft
  s   € ä˜™Ó¤)¨A©C£.Ñ0Ð0r8   c                 ó¢   • [         R                  " S5      nS[        R                  " X-
  U-  5      [        R                  " X-   U-  5      -   -  $ r]  )rQ   r&  r~   Úerf)rE   rv   rj  Úsqrt_twos       r6   r{   Úfoldnorm_gen._cdfx
  s?   € Ü—7’7˜1“:ˆØ”b—f’f˜a™e XÑ-Ó.´·²¸¹ÀÑ8HÓ1IÑIÑJÐJr8   c                 ó8   • [        X-
  5      [        X-   5      -   $ rO   r  rn  s      r6   r€   Úfoldnorm_gen._sf|
  s   € Ü˜™‹¤¨!©%£Ñ0Ð0r8   c                 óÚ  • X-  n[         R                  " SU-  5      [         R                  " S[         R                  -  5      -  nSU-  U[        R
                  " U[         R                  " S5      -  5      -  -   nUS-   XD-  -
  nSXD-  U-  X$-  -
  U-
  -  nU[         R                  " US5      -  nX"S-   -  S-   SU-  U-  -   nUSUS	-
  -  S	US-  -  -
  US-  -  -  nXuS-  -  S	-
  nXEXg4$ )
Nç      à¿rÑ   rW   r   rg  rc  rÌ  r  r·  )rQ   rÒ   r&  r  r~   r:  ri  )rE   rj  rã  Úexpfacr}  r~  r  r€  s           r6   r   Úfoldnorm_gen._stats
  sù   € ð ‰SˆÜ—’˜˜R™“¤2§7¢7¨2¬b¯e©e©8Ó#4Ñ4ˆà�‰Y˜œRŸVšV A¤b§g¢g¨a£j¡LÓ1Ñ1Ñ1ˆØ�1‰f�r‘u‰nˆà�2‘5˜‘8˜b™eÑ# fÑ,Ñ-ˆØ
Œb�hŠh�s˜CÓ Ñ ˆà˜‘7‰^˜aÑ " V¡)¨B¡,Ñ.ˆØ
ˆr�R˜"‘W‰~  R¨¡U¡
Ñ*¨b°!©eÑ3Ñ3ˆØ�s‘(‰]˜RÑˆà˜ˆÐr8   r�   r-  rÿ  r�   r8   r6   r/  r/  U
  s,   † ñò*òDô;ò1òKò1õr8   r/  Úfoldnormc                   ó|   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS r\" \SS9U 4S j5       rSrU =r$ )Úweibull_min_geni–
  a‰  Weibull minimum continuous random variable.

The Weibull Minimum Extreme Value distribution, from extreme value theory
(Fisher-Gnedenko theorem), is also often simply called the Weibull
distribution. It arises as the limiting distribution of the rescaled
minimum of iid random variables.

%(before_notes)s

See Also
--------
weibull_max, numpy.random.Generator.weibull, exponweib

Notes
-----
The probability density function for `weibull_min` is:

.. math::

    f(x, c) = c x^{c-1} \exp(-x^c)

for :math:`x > 0`, :math:`c > 0`.

`weibull_min` takes ``c`` as a shape parameter for :math:`c`.
(named :math:`k` in Wikipedia article and :math:`a` in
``numpy.random.weibull``).  Special shape values are :math:`c=1` and
:math:`c=2` where Weibull distribution reduces to the `expon` and
`rayleigh` distributions respectively.

Suppose ``X`` is an exponentially distributed random variable with
scale ``s``. Then ``Y = X**k`` is `weibull_min` distributed with shape
``c = 1/k`` and scale ``s**k``.

%(after_notes)s

References
----------
https://en.wikipedia.org/wiki/Weibull_distribution

https://en.wikipedia.org/wiki/Fisher-Tippett-Gnedenko_theorem

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úweibull_min_gen._shape_infoÃ
  r5  r8   c                 óf   • U[        XS-
  5      -  [        R                  " [        X5      * 5      -  $ ra   ©rÃ  rQ   rÒ   rn  s      r6   rw   Úweibull_min_gen._pdfÆ
  s(   € à”�Q˜!™“‰}œRŸVšV¤S¨£Y JÓ/Ñ/Ð/r8   c                 ó|   • [         R                  " U5      [        R                  " US-
  U5      -   [	        X5      -
  $ ra   ©rQ   r  r~   r¹  rÃ  rn  s      r6   rü   Úweibull_min_gen._logpdfÊ
  s-   € Ü�vŠv�a‹yœ2Ÿ8š8 A¨¡E¨1Ó-Ñ-´°A³	Ñ9Ð9r8   c                 óD   • [         R                  " [        X5      * 5      * $ rO   ©r~   rt  rÃ  rn  s      r6   r{   Úweibull_min_gen._cdfÍ
  s   € Ü—’œ#˜a›)˜Ó$Ð$Ð$r8   c                 óL   • [        [        R                  " U* 5      * SU-  5      $ r>  rÂ  ru  s      r6   r†   Úweibull_min_gen._ppfÐ
  s   € Ü”B—H’H˜a˜R“L�= # a¡%Ó(Ð(r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r¥  rn  s      r6   r€   Úweibull_min_gen._sfÓ
  ó   € Ü�vŠv�d—k‘k !Ó'Ó(Ð(r8   c                 ó   • [        X5      * $ rO   ©rÃ  rn  s      r6   r	  Úweibull_min_gen._logsfÖ
  s   € Ü�A“	ˆzÐr8   c                 ó<   • [         R                  " U5      * SU-  -  $ ra   rg  ru  s      r6   rŠ   Úweibull_min_gen._isfÙ
  s   € Ü—’˜“�
˜a ™cÑ"Ð"r8   c                 ó@   • [         R                  " SUS-  U-  -   5      $ r>  r@  r  s      r6   r+  Úweibull_min_gen._munpÜ
  s   € Ü�xŠx˜˜A˜c™E !™G™Ó$Ð$r8   c                 óX   • [         * U-  [        R                  " U5      -
  [         -   S-   $ ra   ©r$   rQ   r  r	  s     r6   r  Úweibull_min_gen._entropyß
  ó%   € Üˆw˜‰{œRŸVšV A›YÑ&¬Ñ/°!Ñ3Ð3r8   aÌ          If ``method='mm'``, parameters fixed by the user are respected, and the
        remaining parameters are used to match distribution and sample moments
        where possible. For example, if the user fixes the location with
        ``floc``, the parameters will only match the distribution skewness and
        variance to the sample skewness and variance; no attempt will be made
        to match the means or minimize a norm of the errors.
        

r  c           	      óz  >^^• [        U[        5      (       a9  UR                  5       S:X  a  UR                  5       nO[        TU ]  " U/UQ70 UD6$ UR                  SS5      (       a  [        TU ]  " U/UQ70 UD6$ [        XX#5      u  ppVUR                  SS5      R                  5       nS m[        R                  " U5      mSnT" U5      n	TU	:  a$  US:w  a  Uc  U(       d  [        TU ]  " U/UQ70 UD6$ US:X  a  S	u  p«nO;[        U5      (       a  US   OS n
UR                  S
S 5      nUR                  SS 5      nUc   U
c  [        UU4S jSU/SS9R                  n
OUb  Un
Ucm  Ucj  [        R                   " U5      n[        R"                  " U[$        R&                  " SSU
-  -   5      [$        R&                  " SSU
-  -   5      S-  -
  -  5      nOUb  UnUc;  Uc8  [        R(                  " U5      nXì[$        R&                  " SSU
-  -   5      -  -
  nOUb  UnUS:X  a  X«U4$ [        TU ]  " X4X¼S.UD6$ )Nr   ÚsuperfitFr1   r;   c                 óî   • [         R                  " SSU -  -   5      n[         R                  " SSU -  -   5      n[         R                  " SSU -  -   5      nSUS-  -  SU-  U-  -
  U-   nX!S-  -
  S-  nXE-  $ )Nr   rW   rÌ  rg  r@  )rj  Úgamma1Úgamma2Úgamma3Únumrä  s         r6   ÚskewÚ!weibull_min_gen.fit.<locals>.skewý
  sx   € Ü—X’X˜a  !¡™e“_ˆFÜ—X’X˜a  !¡™e“_ˆFÜ—X’X˜a  !¡™e“_ˆFØ�f˜a‘i‘- ! F¡(¨6¡/Ñ1°FÑ:ˆCØ A™IÑ%¨Ñ-ˆCØ‘7ˆNr8   g     ˆÃ@r<   ©NNNr.   r/   c                 ó   >• T" U 5      T-
  $ rO   r�   )rj  rx  rh  s    €€r6   r  Ú%weibull_min_gen.fit.<locals>.<lambda>  s   ø€ ¡d¨1£g°¢kr8   g{®Gáz”?Úbisect)Úbracketr1   r   rW   ©r.   r/   )r?   r*   r@   rÛ  rA   rC   r3   Ú_check_fit_input_parametersr=   r>   rT  rh  rí  r+   ÚrootrQ   rð  r&  r~   r6  r%  )rE   rF   rG   r5   Úfcr  r  r1   Úmax_cÚs_minrj  r.   r/   r%  r  rx  rh  rÞ  s                  @@€r6   rC   Úweibull_min_gen.fitâ
  s2  ú€ ô �dœL×)Ñ)Ø× Ñ Ó" aÓ'Ø—~‘~Ó'‘ä‘w’{ 4Ð7¨$Ò7°$Ñ7Ð7à�8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ô "=¸TØ=Aó"IÑˆ�$à—‘˜( EÓ*×0Ñ0Ó2ˆò	ô �JŠJ�tÓˆØˆÙ�U“ˆØˆu‹9˜ 4›¨B©J¾tÜ‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ð �T‹>Ø,‰MˆA‘Eä˜tŸ9™9��Q’¨$ˆAØ—(‘(˜5 $Ó'ˆCØ—H‘H˜W dÓ+ˆEà‰:˜!™)ô Õ1¸DÀ%¸=Ø#+ñ-ß-1©Tñ à‰^ØˆAà‰>˜e™mÜ—’�t“ˆAÜ—G’G˜A¤§¢¨!¨A¨a©C©%£´2·8²8¸A¸aÀ¹c¹E³?ÀAÑ3EÑ!EÑFÓG‰EØÑØˆEà‰<˜C™KÜ—’˜“ˆAØœBŸHšH Q¨¨1©¡WÓ-Ñ-Ñ-‰CØÑØˆCà�T‹>Ø˜5�=Ð ô ‘7’;˜tÐE¨CÑEÀÑEÐEr8   r�   )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   r	  rŠ   r+  r  r	   r   rC   r“   r-  r.  s   @r6   rE  rE  –
  s`   ø† ñ+òXEò0ò:ò%ò)ò)òò#ò%ò4ñ ˜}ð 5ñ ôJFóöJFr8   rE  r(  c                   ót   ^ • \ rS rSrSrS rS rU 4S jrS rS r	S r
S	 rS
 rS rS rS rS rS rSrU =r$ )Útruncweibull_min_geni:  aÍ  A doubly truncated Weibull minimum continuous random variable.

%(before_notes)s

See Also
--------
weibull_min, truncexpon

Notes
-----
The probability density function for `truncweibull_min` is:

.. math::

    f(x, a, b, c) = \frac{c x^{c-1} \exp(-x^c)}{\exp(-a^c) - \exp(-b^c)}

for :math:`a < x <= b`, :math:`0 \le a < b` and :math:`c > 0`.

`truncweibull_min` takes :math:`a`, :math:`b`, and :math:`c` as shape
parameters.

Notice that the truncation values, :math:`a` and :math:`b`, are defined in
standardized form:

.. math::

    a = (u_l - loc)/scale
    b = (u_r - loc)/scale

where :math:`u_l` and :math:`u_r` are the specific left and right
truncation values, respectively. In other words, the support of the
distribution becomes :math:`(a*scale + loc) < x <= (b*scale + loc)` when
:math:`loc` and/or :math:`scale` are provided.

%(after_notes)s

References
----------

.. [1] Rinne, H. "The Weibull Distribution: A Handbook". CRC Press (2009).

%(example)s

c                 ó"   • US:¬  X2:„  -  US:„  -  $ ©Nr”   r�   ©rE   rj  r—   r˜   s       r6   rf   Útruncweibull_min_gen._argcheckg  s   € Ø�R‘˜A™EÑ" a¨"¡fÑ-Ð-r8   c                 ó¾   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      n[        SSS[        R                  4S5      nXU/$ )Nrj  Fr   r3  r—   rk   r˜   rl   )rE   rŠ  r§  r¨  s       r6   ro   Ú truncweibull_min_gen._shape_infoj  sT   € Ü˜˜U Q¬¯© K°Ó@ˆÜ˜˜U Q¬¯© K°Ó?ˆÜ˜˜U Q¬¯© K°Ó@ˆØ˜ˆ|Ðr8   c                 ó    >• [         TU ]  USS9$ )N)r   r   r   r‰  ©rA   rÝ  ©rE   rF   rÞ  s     €r6   rÝ  Útruncweibull_min_gen._fitstartp  s   ø€ ä‰wÑ  ¨IÐ Ð6Ð6r8   c                 ó   • X#4$ rO   r�   rz  s       r6   r¥   Ú!truncweibull_min_gen._get_supportt  ó	   € Øˆtˆr8   c                 óî   • [         R                  " [        X25      * 5      [         R                  " [        XB5      * 5      -
  nU[        XS-
  5      -  [         R                  " [        X5      * 5      -  U-  $ ra   ©rQ   rÒ   rÃ  )rE   rv   rj  r—   r˜   Údenums         r6   rw   Útruncweibull_min_gen._pdfw  sU   € Ü—’œ˜Q›˜
Ó#¤b§f¢f¬c°!«i¨ZÓ&8Ñ8ˆØ”C˜˜Q™3“K‘¤"§&¢&¬#¨a«)¨Ó"4Ñ4¸Ñ=Ð=r8   c           	      ó,  • [         R                  " [         R                  " [        X25      * 5      [         R                  " [        XB5      * 5      -
  5      n[         R                  " U5      [        R
                  " US-
  U5      -   [        X5      -
  U-
  $ ra   )rQ   r  rÒ   rÃ  r~   r¹  )rE   rv   rj  r—   r˜   Úlogdenums         r6   rü   Útruncweibull_min_gen._logpdf{  sc   € Ü—6’6œ"Ÿ&š&¤# a£) Ó,¬r¯vªv´s¸1³y°jÓ/AÑAÓBˆÜ�vŠv�a‹yœ2Ÿ8š8 A¨¡E¨1Ó-Ñ-´°A³	Ñ9¸HÑDÐDr8   c                 ó  • [         R                  " [        X25      * 5      [         R                  " [        X5      * 5      -
  n[         R                  " [        X25      * 5      [         R                  " [        XB5      * 5      -
  nXV-  $ rO   r†  ©rE   rv   rj  r—   r˜   rg  r‡  s          r6   r{   Útruncweibull_min_gen._cdf  óZ   € Ü�vŠv”s˜1“y�jÓ!¤B§F¢F¬C°«I¨:Ó$6Ñ6ˆÜ—’œ˜Q›˜
Ó#¤b§f¢f¬c°!«i¨ZÓ&8Ñ8ˆØ‰{Ðr8   c           	      ó^  • [         R                  " [         R                  " [        X25      * 5      [         R                  " [        X5      * 5      -
  5      n[         R                  " [         R                  " [        X25      * 5      [         R                  " [        XB5      * 5      -
  5      nXV-
  $ rO   ©rQ   r  rÒ   rÃ  ©rE   rv   rj  r—   r˜   ÚlognumrŠ  s          r6   r  Útruncweibull_min_gen._logcdf„  óm   € Ü—’œŸš¤ A£	˜zÓ*¬R¯VªV´S¸³Y°JÓ-?Ñ?Ó@ˆÜ—6’6œ"Ÿ&š&¤# a£) Ó,¬r¯vªv´s¸1³y°jÓ/AÑAÓBˆØÑ Ð r8   c                 ó  • [         R                  " [        X5      * 5      [         R                  " [        XB5      * 5      -
  n[         R                  " [        X25      * 5      [         R                  " [        XB5      * 5      -
  nXV-  $ rO   r†  r�  s          r6   r€   Útruncweibull_min_gen._sf‰  r�  r8   c           	      ó^  • [         R                  " [         R                  " [        X5      * 5      [         R                  " [        XB5      * 5      -
  5      n[         R                  " [         R                  " [        X25      * 5      [         R                  " [        XB5      * 5      -
  5      nXV-
  $ rO   r‘  r’  s          r6   r	  Útruncweibull_min_gen._logsfŽ  r•  r8   c                 óÚ   • [        [        R                  " SU-
  [        R                  " [        XB5      * 5      -  U[        R                  " [        X25      * 5      -  -   5      * SU-  5      $ ra   ©rÃ  rQ   r  rÒ   ©rE   r…   rj  r—   r˜   s        r6   rŠ   Útruncweibull_min_gen._isf“  óU   € ÜÜ�VŠV�Q˜‘UœbŸfšf¤c¨!£i ZÓ0Ñ0°1´r·v²v¼sÀ1»y¸jÓ7IÑ3IÑIÓJÐJÈAÈaÉCóð 	r8   c                 óÚ   • [        [        R                  " SU-
  [        R                  " [        X25      * 5      -  U[        R                  " [        XB5      * 5      -  -   5      * SU-  5      $ ra   r›  rœ  s        r6   r†   Útruncweibull_min_gen._ppf˜  rž  r8   c           	      óZ  • [         R                  " X-  S-   5      [         R                  " X-  S-   [        XB5      5      [         R                  " X-  S-   [        X25      5      -
  -  n[        R
                  " [        X25      * 5      [        R
                  " [        XB5      * 5      -
  nXV-  $ r>  )r~   r6  rV  rÃ  rQ   rÒ   )rE   re   rj  r—   r˜   Ú	gamma_funr‡  s          r6   r+  Útruncweibull_min_gen._munp�  s€   € Ü—H’H˜Q™S 2™XÓ&Ü�KŠK˜™˜b™¤# a£)Ó,¬r¯{ª{¸1¹3À¹8ÄSÈÃYÓ/OÑOñˆ	ô —’œ˜Q›˜
Ó#¤b§f¢f¬c°!«i¨ZÓ&8Ñ8ˆØÑ Ð r8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   rÝ  r¥   rw   rü   r{   r  r€   r	  rŠ   r†   r+  r“   r-  r.  s   @r6   rw  rw  :  sP   ø† ñ+òX.òõ7òò>òEòò
!ò
ò
!ò
ò
÷
!ð !r8   rw  Útruncweibull_minrø  c                   óN   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rSrg)Úweibull_max_geni©  aØ  Weibull maximum continuous random variable.

The Weibull Maximum Extreme Value distribution, from extreme value theory
(Fisher-Gnedenko theorem), is the limiting distribution of rescaled
maximum of iid random variables. This is the distribution of -X
if X is from the `weibull_min` function.

%(before_notes)s

See Also
--------
weibull_min

Notes
-----
The probability density function for `weibull_max` is:

.. math::

    f(x, c) = c (-x)^{c-1} \exp(-(-x)^c)

for :math:`x < 0`, :math:`c > 0`.

`weibull_max` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

References
----------
https://en.wikipedia.org/wiki/Weibull_distribution

https://en.wikipedia.org/wiki/Fisher-Tippett-Gnedenko_theorem

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úweibull_max_gen._shape_infoÎ  r5  r8   c                 ón   • U[        U* US-
  5      -  [        R                  " [        U* U5      * 5      -  $ ra   rI  rn  s      r6   rw   Úweibull_max_gen._pdfÑ  s0   € à”�a�R˜˜1™“‰~œbŸfšf¤c¨1¨"¨a£j [Ó1Ñ1Ð1r8   c                 ó‚   • [         R                  " U5      [        R                  " US-
  U* 5      -   [	        U* U5      -
  $ ra   rL  rn  s      r6   rü   Úweibull_max_gen._logpdfÕ  s3   € Ü�vŠv�a‹yœ2Ÿ8š8 A a¡C¨!¨Ó,Ñ,¬s°A°2°q«zÑ9Ð9r8   c                 óF   • [         R                  " [        U* U5      * 5      $ rO   r†  rn  s      r6   r{   Úweibull_max_gen._cdfØ  s   € Ü�vŠv”s˜A˜2˜q“z�kÓ"Ð"r8   c                 ó   • [        U* U5      * $ rO   rW  rn  s      r6   r  Úweibull_max_gen._logcdfÛ  s   € Ü�Q�B˜“
ˆ{Ðr8   c                 óH   • [         R                  " [        U* U5      * 5      * $ rO   rO  rn  s      r6   r€   Úweibull_max_gen._sfÞ  s   € Ü—’œ#˜q˜b !›*˜Ó%Ð%Ð%r8   c                 óL   • [        [        R                  " U5      * SU-  5      * $ r>  )rÃ  rQ   r  ru  s      r6   r†   Úweibull_max_gen._ppfá  s    € Ü”R—V’V˜A“Y�J  A¡Ó&Ð&Ð&r8   c                 ó~   • [         R                  " SUS-  U-  -   5      n[        U5      S-  (       a  SnXC-  $ SnXC-  $ )Nr•   rW   r  r   )r~   r6  r*  )rE   re   rj  ÚvalÚsgns        r6   r+  Úweibull_max_gen._munpä  sE   € Ü�hŠh�s˜1˜S™5 ™7‘{Ó#ˆÜˆq‹6�A�:ØˆCð ‰yÐð ˆCØ‰yÐr8   c                 óX   • [         * U-  [        R                  " U5      -
  [         -   S-   $ ra   r^  r	  s     r6   r  Úweibull_max_gen._entropyì  r`  r8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r  r€   r†   r+  r  r“   r�   r8   r6   r¦  r¦  ©  s6   † ñ#òHEò2ò:ò#òò&ò'òõ4r8   r¦  Úweibull_max)r˜   r™   c                   óT   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rSrg)Úgenlogistic_genió  a1  A generalized logistic continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `genlogistic` is:

.. math::

    f(x, c) = c \frac{\exp(-x)}
                     {(1 + \exp(-x))^{c+1}}

for real :math:`x` and :math:`c > 0`. In literature, different
generalizations of the logistic distribution can be found. This is the type 1
generalized logistic distribution according to [1]_. It is also referred to
as the skew-logistic distribution [2]_.

`genlogistic` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

References
----------
.. [1] Johnson et al. "Continuous Univariate Distributions", Volume 2,
       Wiley. 1995.
.. [2] "Generalized Logistic Distribution", Wikipedia,
       https://en.wikipedia.org/wiki/Generalized_logistic_distribution

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úgenlogistic_gen._shape_info  r5  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rn  s      r6   rw   Úgenlogistic_gen._pdf  r³  r8   c                 óæ   • US-
  * US:  -  S-
  n[         R                  " U5      n[         R                  " U5      X4-  -   US-   [        R                  " [         R
                  " U* 5      5      -  -
  $ ©Nr   r   )rQ   r  r  r~   rï  rÒ   )rE   rv   rj  Úmultr  s        r6   rü   Úgenlogistic_gen._logpdf  s`   € ð �Q‘ˆx˜1˜q™5Ñ! AÑ%ˆÜ�vŠv�a‹yˆÜ�vŠv�a‹y˜4™9Ñ$¨¨!©¬r¯xªx¼¿ºÀ¸u»Ó/FÑ'FÑFÐFr8   c                 óB   • S[         R                  " U* 5      -   U* -  nU$ ra   rP  )rE   rv   rj  ÚCxs       r6   r{   Úgenlogistic_gen._cdf#  s!   € Ø”—’˜�r“
‰l˜q˜bÑ!ˆØˆ	r8   c                 ó`   • U* [         R                  " [         R                  " U* 5      5      -  $ rO   )rQ   rï  rÒ   rn  s      r6   r  Úgenlogistic_gen._logcdf'  s"   € Øˆr”B—H’HœRŸVšV Q B›ZÓ(Ñ(Ð(r8   c                 ó`   • [         R                  " [        R                  " USU-  5      5      * $ r±  )rQ   r  r~   Úpowm1ru  s      r6   r†   Úgenlogistic_gen._ppf*  s#   € Ü—’”r—x’x  4¨¡6Ó*Ó+Ð+Ð+r8   c                 óN   • [         R                  " U R                  X5      5      * $ rO   ©r~   rt  r  rn  s      r6   r€   Úgenlogistic_gen._sf-  ó   € Ü—’˜Ÿ™ aÓ+Ó,Ð,Ð,r8   c                 ó,   • U R                  SU-
  U5      $ ra   ©r†   ru  s      r6   rŠ   Úgenlogistic_gen._isf0  s   € Ø�y‰y˜˜Q™ Ó"Ð"r8   c                 ó¨  • [         [        R                  " U5      -   n[        R                  [        R                  -  S-  [        R
                  " SU5      -   nS[        R
                  " SU5      -  S[        -  -   nU[        R                  " US5      -  n[        R                  S-  S-  S[        R
                  " SU5      -  -   nXSS	-  -  nX#XE4$ )
Nrc  rW   r;  rÌ  rg  rU  ç      .@rË  rÑ   )r$   r~   r™  rQ   r  Úzetar%   ri  ©rE   rj  r}  r~  r  r€  s         r6   r   Úgenlogistic_gen._stats3  s£   € Ü”b—f’f˜Q“iÑˆÜ�e‰e”B—E‘E‰k˜#‰o¤§¢¨¨1£Ñ-ˆØ”—’˜˜1“Ñ ¤&¡Ñ(ˆØ
Œb�hŠh�s˜CÓ Ñ ˆÜ�U‰U�A‰X�d‰]˜QœrŸwšw q¨!›}™_Ñ,ˆØ
�3‰h‰ˆØ˜ˆÐr8   c                 ó>   • [         R                  " US:  US S 5      $ )Ng    €„^Ac                 óx   • [         R                  " U 5      * [        R                  " U S-   5      -   [        -   S-   $ ra   )rQ   r  r~   r™  r$   r¬  s    r6   r  Ú*genlogistic_gen._entropy.<locals>.<lambda>?  s)   € ”r—v’v˜a“y�j¤2§6¢6¨!¨a©%£=Ñ0´6Ñ9¸AÒ=r8   c                 ó&   • SSU -  -  [         -   S-   $ rf  ©r$   r¬  s    r6   r  rÜ  E  s   € �a˜1˜q™5‘k¤FÑ*¨QÒ.r8   rK  r	  s     r6   r  Úgenlogistic_gen._entropy<  s$   € Ü�ŠØ�‰G�QÙ=ñ /ó0ð 	0r8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r  r†   r€   rŠ   r   r  r“   r�   r8   r6   r½  r½  ó  s<   † ñò@Eò*òGòò)ò,ò-ò#òõ	0r8   r½  Úgenlogisticc                   ój   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rSS jrS rS rSrg)Úgenpareto_geniK  a=  A generalized Pareto continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `genpareto` is:

.. math::

    f(x, c) = (1 + c x)^{-1 - 1/c}

defined for :math:`x \ge 0` if :math:`c \ge 0`, and for
:math:`0 \le x \le -1/c` if :math:`c < 0`.

`genpareto` takes ``c`` as a shape parameter for :math:`c`.

For :math:`c=0`, `genpareto` reduces to the exponential
distribution, `expon`:

.. math::

    f(x, 0) = \exp(-x)

For :math:`c=-1`, `genpareto` is uniform on ``[0, 1]``:

.. math::

    f(x, -1) = 1

%(after_notes)s

%(example)s

c                 ó.   • [         R                  " U5      $ rO   ©rQ   r#  r	  s     r6   rf   Úgenpareto_gen._argchecko  ó   € Ü�{Š{˜1‹~Ðr8   c                 ó^   • [        SS[        R                  * [        R                  4S5      /$ ©Nrj  Fr3  rl   rn   s    r6   ro   Úgenpareto_gen._shape_infor  ó%   € Ü˜3 ¬¯©¨´·±Ð'8¸.ÓIÐJÐJr8   c                 óê   • [         R                  " U5      n[         R                  " U R                  U5      S   R	                  5       n[
        R                  " US:  US [         R                  S9nX#4$ )Nr   c                 ó   • SU -  $ r±  r�   r¬  s    r6   r  Ú,genpareto_gen._get_support.<locals>.<lambda>x  s   € °°a²r8   r  )rQ   r"  rS  r—   Úcopyr#  r$  rm   rz  s       r6   r¥   Úgenpareto_gen._get_supportu  sZ   € Ü�JŠJ�q‹MˆÜ×Ò §¡¨Ó*¨1Ñ-×2Ñ2Ó4ˆÜ�OŠO˜A ™E 1Ñ&7Ü')§v¡vñ/ˆàˆtˆr8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rn  s      r6   rw   Úgenpareto_gen._pdf|  r³  r8   c                 óF   • [         R                  " X:H  US:g  -  X4S U* S9$ )Nr   c                 óB   • [         R                  " US-   X-  5      * U-  $ r>  râ  ©rv   rj  s     r6   r  Ú'genpareto_gen._logpdf.<locals>.<lambda>‚  s   € ¬R¯ZªZ¸¸B¹ÀÁÓ-DÐ,DÀqÒ,Hr8   r  rK  rn  s      r6   rü   Úgenpareto_gen._logpdf€  s,   € Ü�Š ¡¨1°©6Ñ2°Q°FÙHØ+,¨"ñ.ð 	.r8   c                 ó6   • [         R                  " U* U* 5      * $ rO   )r~   Úinv_boxcox1prn  s      r6   r{   Úgenpareto_gen._cdf…  s   € Ü—’   Q BÓ'Ð'Ð'r8   c                 ó4   • [         R                  " U* U* 5      $ rO   )r~   Ú
inv_boxcoxrn  s      r6   r€   Úgenpareto_gen._sfˆ  s   € Ü�}Š}˜a˜R ! Ó$Ð$r8   c                 óF   • [         R                  " X:H  US:g  -  X4S U* S9$ )Nr   c                 ó:   • [         R                  " X-  5      * U-  $ rO   rm  rô  s     r6   r  Ú&genpareto_gen._logsf.<locals>.<lambda>�  s   € ¬R¯XªX°a±c«]¨N¸QÒ,>r8   r  rK  rn  s      r6   r	  Úgenpareto_gen._logsf‹  s,   € Ü�Š ¡¨1°©6Ñ2°Q°FÙ>Ø+,¨"ñ.ð 	.r8   c                 ó6   • [         R                  " U* U* 5      * $ rO   )r~   Úboxcox1pru  s      r6   r†   Úgenpareto_gen._ppf�  s   € Ü—’˜Q˜B  Ó#Ð#Ð#r8   c                 ó2   • [         R                  " X* 5      * $ rO   )r~   Úboxcoxru  s      r6   rŠ   Úgenpareto_gen._isf“  s   € Ü—	’	˜!˜RÓ Ð Ð r8   c                 óŒ  • Su  p4pVSU;   a)  [         R                  " US:  US [        R                  S9nSU;   a)  [         R                  " US:  US [        R                  S9nS	U;   a)  [         R                  " US
:  US [        R                  S9nSU;   a)  [         R                  " US:  US [        R                  S9nX4XV4$ )N©NNNNr  r   c                 ó   • SSU -
  -  $ ra   r�   ©Úxis    r6   r  Ú&genpareto_gen._stats.<locals>.<lambda>›  s   € ¨1°°B±ª<r8   r  r%  r£   c                 ó*   • SSU -
  S-  -  SSU -  -
  -  $ rf  r�   r
  s    r6   r  r     s   € ¨1°°B±¸©{©?¸aÀ!ÀbÁ&¹jÒ+Ir8   rx  gUUUUUUÕ?c                 ó^   • SSU -   -  [         R                  " SSU -  -
  5      -  SSU -  -
  -  $ )NrW   r   rÌ  rÍ  r
  s    r6   r  r  ¦  s/   € ˜1  B¡™<¬"¯'ª'°!°a¸±d±(Ó*;Ñ;¸qÀ1ÀRÁ4¹xÒHr8   rz  rÖ  c                 ó`   • SSSU -  -
  -  SU S-  -  U -   S-   -  SSU -  -
  -  SSU -  -
  -  S-
  $ )NrÌ  r   rW   rU  r�   r
  s    r6   r  r  ¬  sN   € ˜1  A b¡D¡™>¨Q¨r°1©u©W°r©\¸AÑ-=Ñ>Ø ! B¡$™hñ(Ø+,¨q°©t©8ñ5Ø78ò9r8   ©r#  r$  rQ   rm   rF  )rE   rj  r}  r  r%  rx  rz  s          r6   r   Úgenpareto_gen._stats–  s½   € Ø+‰
ˆˆaà�'‹>Ü—’  A¡ qÙ 7Ü+-¯6©6ñ3ˆAð �'‹>Ü—’  C¡¨Ù IÜ+-¯6©6ñ3ˆAð �'‹>Ü—’Ø�C‘˜ÙHÜŸ6™6ñ#ˆAð
 �'‹>Ü—’Ø�C‘˜ñ9äŸ6™6ñ	#ˆAð �QˆzÐr8   c           	      óp   ^• U4S jn[         R                  " US:g  X#[        R                  " TS-   5      S9$ )Nc                 ó  >• Sn[         R                  " STS-   5      n[        U[        R                  " TU5      5       H  u  p4XSU-  -  SX-  -
  -  -   nM     [         R
                  " U T-  S:  USU -  T-  -  [         R                  5      $ )Nr”   r   r   r  r•   r­  )rQ   rÁ  Úzipr~   ÚcombrÃ  rm   )rj  r¶  rz  ÚkiÚcnkre   s        €r6   rË  Ú#genpareto_gen._munp.<locals>.__munp³  s�   ø€ ØˆCÜ—	’	˜!˜Q ™UÓ#ˆAÜ˜q¤"§'¢'¨!¨Q£-Ö0‘�Ø 2¨"¡*Ñ,°°a±f±Ñ=Ñ=’ñ 1ä—8’8˜A ™E A™I s¨d°Q©h¸1©_Ñ'<¼b¿f¹fÓEÐEr8   r   r   r  )r#  r$  r~   r6  )rE   re   rj  Ú_genpareto_gen__munps    `  r6   r+  Úgenpareto_gen._munp²  s.   ø€ õ	Fô �Š˜q A™v q¼R¿XºXÀaÈ!Áe»_ÑMÐMr8   c                 ó   • SU-   $ r>  r�   r	  s     r6   r  Úgenpareto_gen._entropy¼  ó   € Ø�A‰vˆr8   r�   Nr‚  )rŽ   r�   r�   r‘   r’   rf   ro   r¥   rw   rü   r{   r€   r	  r†   rŠ   r   r+  r  r“   r�   r8   r6   râ  râ  K  sK   † ñ"òFòKòò*ò.ò
(ò%ò.ò
$ò!ôò8Nõr8   râ  Ú	genparetoc                   óB   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
rg)Úgenexpon_geniÃ  aÕ  A generalized exponential continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `genexpon` is:

.. math::

    f(x, a, b, c) = (a + b (1 - \exp(-c x)))
                    \exp(-a x - b x + \frac{b}{c}  (1-\exp(-c x)))

for :math:`x \ge 0`, :math:`a, b, c > 0`.

`genexpon` takes :math:`a`, :math:`b` and :math:`c` as shape parameters.

%(after_notes)s

References
----------
H.K. Ryu, "An Extension of Marshall and Olkin's Bivariate Exponential
Distribution", Journal of the American Statistical Association, 1993.

N. Balakrishnan, Asit P. Basu (editors), *The Exponential Distribution:
Theory, Methods and Applications*, Gordon and Breach, 1995.
ISBN 10: 2884491929

%(example)s

c                 ó¾   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      n[        SSS[        R                  4S5      nXU/$ )Nr—   Fr   r3  r˜   rj  rl   )rE   r§  r¨  rŠ  s       r6   ro   Úgenexpon_gen._shape_infoã  sT   € Ü˜˜U Q¬¯© K°Ó@ˆÜ˜˜U Q¬¯© K°Ó@ˆÜ˜˜U Q¬¯© K°Ó@ˆØ˜ˆ|Ðr8   c           	      óÂ   • X#[         R                  " U* U-  5      * -  -   [        R                  " U* U-
  U-  U[         R                  " U* U-  5      * -  U-  -   5      -  $ rO   ©r~   rt  rQ   rÒ   ©rE   rv   r—   r˜   rj  s        r6   rw   Úgenexpon_gen._pdfé  sf   € ð œŸš !  A¡›�Ñ'Ñ'¬¯ª°!°°A±°q±Ø01´B·H²H¸a¸RÀ¹T³N°?Ñ0CÀAÑ0Eñ1Fó *Gñ Gð 	Gr8   c                 óÂ   • [         R                  " X#[        R                  " U* U-  5      * -  -   5      U* U-
  U-  -   U[        R                  " U* U-  5      * -  U-  -   $ rO   ©rQ   r  r~   rt  r%  s        r6   rü   Úgenexpon_gen._logpdfï  sW   € Ü�vŠv�aœBŸHšH a R¨¡T›N˜?Ñ+Ñ+Ó,°°°1±°a©xÑ7¸¼B¿HºHÀaÀRÈÁT»N¸?Ñ8KÈAÑ8MÑMÐMr8   c                 ó‚   • [         R                  " U* U-
  U-  U[         R                  " U* U-  5      * -  U-  -   5      * $ rO   rV  r%  s        r6   r{   Úgenexpon_gen._cdfò  s=   € Ü—’˜1˜"˜Q™$ ™ A¬¯ª°!°°A±« Ñ$7¸Ñ$9Ñ9Ó:Ð:Ð:r8   c                 óÌ   • X#-   nX4[         R                  " U* 5      -  -
  U-  nU[        R                  " U* U-  [         R                  " U* 5      -  5      R
                  -   U-  $ rO   )rQ   rï  r~   ÚlambertwrÒ   Úreal©rE   rV  r—   r˜   rj  rx  rÌ  s          r6   r†   Úgenexpon_gen._ppfõ  sX   € Ø‰EˆØ”2—8’8˜Q˜B“<‘Ñ Ñ"ˆØ”B—K’K   1¡¤r§v¢v¨q¨b£zÑ 1Ó2×7Ñ7Ñ7¸Ñ:Ð:r8   c                 ó€   • [         R                  " U* U-
  U-  U[        R                  " U* U-  5      * -  U-  -   5      $ rO   r¼  r%  s        r6   r€   Úgenexpon_gen._sfú  s:   € Ü�vŠv˜�r˜!‘t˜Q‘h ¤R§X¢X¨q¨b°©d£^ OÑ!4°QÑ!6Ñ6Ó7Ð7r8   c                 óÊ   • X#-   nX4[         R                  " U5      -  -
  U-  nU[        R                  " U* U-  [         R                  " U* 5      -  5      R
                  -   U-  $ rO   )rQ   r  r~   r-  rÒ   r.  r/  s          r6   rŠ   Úgenexpon_gen._isfý  sU   € Ø‰EˆØ”2—6’6˜!“9‘‰_˜aÑˆØ”B—K’K   1¡¤r§v¢v¨q¨b£zÑ 1Ó2×7Ñ7Ñ7¸Ñ:Ð:r8   r�   Nr©  r�   r8   r6   r   r   Ã  s,   † ñò>òGòNò;ò;ò
8õ;r8   r   Úgenexponc                   ó€   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rU 4S jrS rS rSrU =r$ )Úgenextreme_geni  aê  A generalized extreme value continuous random variable.

%(before_notes)s

See Also
--------
gumbel_r

Notes
-----
For :math:`c=0`, `genextreme` is equal to `gumbel_r` with
probability density function

.. math::

    f(x) = \exp(-\exp(-x)) \exp(-x),

where :math:`-\infty < x < \infty`.

For :math:`c \ne 0`, the probability density function for `genextreme` is:

.. math::

    f(x, c) = \exp(-(1-c x)^{1/c}) (1-c x)^{1/c-1},

where :math:`-\infty < x \le 1/c` if :math:`c > 0` and
:math:`1/c \le x < \infty` if :math:`c < 0`.

Note that several sources and software packages use the opposite
convention for the sign of the shape parameter :math:`c`.

`genextreme` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó.   • [         R                  " U5      $ rO   rä  r	  s     r6   rf   Úgenextreme_gen._argcheck-  ræ  r8   c                 ó^   • [        SS[        R                  * [        R                  4S5      /$ rè  rl   rn   s    r6   ro   Úgenextreme_gen._shape_info0  rê  r8   c                 ó   • [         R                  " US:„  S[         R                  " U[        5      -  [         R                  5      n[         R                  " US:  S[         R
                  " U[        * 5      -  [         R                  * 5      nX24$ ©Nr   r•   )rQ   rÃ  Úmaximumr"   rm   Úminimum)rE   rj  Ú_bÚ_as       r6   r¥   Úgenextreme_gen._get_support3  sa   € Ü�XŠX�a˜!‘e˜S¤2§:¢:¨a´Ó#7Ñ7¼¿¹Ó@ˆÜ�XŠX�a˜!‘e˜S¤2§:¢:¨a´%°Ó#8Ñ8¼2¿6¹6¸'ÓBˆØˆvˆr8   c                 óF   • [         R                  " X:H  US:g  -  X4S U* S9$ )Nr   c                 ó<   • [         R                  " U* U -  5      U-  $ rO   rm  rô  s     r6   r  Ú+genextreme_gen._loglogcdf.<locals>.<lambda><  s   € œŸš 1 " Q¡$›¨Ò)r8   r  rK  rn  s      r6   Ú
_loglogcdfÚgenextreme_gen._loglogcdf8  s-   € ä�ŠØ‰V˜˜Q™Ñ ! Ù)Ø�rñð 	r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rn  s      r6   rw   Úgenextreme_gen._pdf?  s   € ô �vŠv�d—l‘l 1Ó(Ó)Ð)r8   c                 ó   • [         R                  " X:H  US:g  -  X!4[        R                  SS9n[        R
                  " U* 5      nU R                  X5      n[        R                  " U5      n[        R                  " XRS:H  U[        R                  * :H  -  S5        [         R                  " US:H  U[        R                  * :H  -  ) XeU4S [        R                  * S9n[        R                  " XrS:H  US:H  -  S5        U$ )Nr   r”   r  r   c                 ó   • U * U-   U-
  $ rO   r�   )Úpex2Úlpex2Úlex2s      r6   r  Ú(genextreme_gen._logpdf.<locals>.<lambda>Q  s   €  t e¨e¡m°dÒ&:r8   )r#  r$  ÚoperatorÚmulr~   rï  rF  rQ   rÒ   Úputmaskrm   )rE   rv   rj  ÚcxÚlogex2Úlogpex2rL  Úlogpdfs           r6   rü   Úgenextreme_gen._logpdfE  sÒ   € ä�_Š_˜a™f¨¨a©Ñ0°1°&Ü%Ÿ\™\°cñ;ˆä—’˜2˜#“ˆØ—/‘/ !Ó'ˆÜ�vŠv�g‹ˆä
�
Š
�7 !™V¨¬b¯f©f¨W©Ñ5°sÔ;Ü—’Ø�Q‰w˜2¤"§&¡& ™=Ñ)Ð*Ø˜FÐ#Ù:ÜŸ™�wñ	 ˆô
 	�
Š
�6 ™F q¨A¡vÑ.°Ô4Øˆr8   c                 óN   • [         R                  " U R                  X5      5      * $ rO   )rQ   rÒ   rF  rn  s      r6   r  Úgenextreme_gen._logcdfV  s   € Ü—’�t—‘ qÓ,Ó-Ð-Ð-r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r  rn  s      r6   r{   Úgenextreme_gen._cdfY  ry  r8   c                 óN   • [         R                  " U R                  X5      5      * $ rO   rÏ  rn  s      r6   r€   Úgenextreme_gen._sf\  rÑ  r8   c                 óœ   • [         R                  " [         R                  " U5      * 5      * n[        R                  " X3:H  US:g  -  X24S US9$ )Nr   c                 ó>   • [         R                  " U* U -  5      * U-  $ rO   rV  rô  s     r6   r  Ú%genextreme_gen._ppf.<locals>.<lambda>c  ó   € œ"Ÿ(š( A 2¨¡6Ó*Ð*¨QÒ.r8   r  )rQ   r  r#  r$  ©rE   r…   rj  rv   s       r6   r†   Úgenextreme_gen._ppf_  sF   € Ü�VŠV”R—V’V˜A“Y�JÓÐˆÜ�ŠØ‰V˜˜Q™Ñ ! Ù.Øñð 	r8   c                 óž   • [         R                  " [        R                  " U* 5      * 5      * n[        R
                  " X3:H  US:g  -  X24S US9$ )Nr   c                 ó>   • [         R                  " U* U -  5      * U-  $ rO   rV  rô  s     r6   r  Ú%genextreme_gen._isf.<locals>.<lambda>j  ra  r8   r  )rQ   r  r~   rï  r#  r$  rb  s       r6   rŠ   Úgenextreme_gen._isff  sH   € Ü�VŠV”R—X’X˜q˜b“\�MÓ"Ð"ˆÜ�ŠØ‰V˜˜Q™Ñ ! Ù.Øñð 	r8   c                 óˆ  ^• U4S jnU" S5      nU" S5      nU" S5      nU" S5      n[         R                  " [        T5      S:  T[         R                  -  S-  S-  XCS-  -
  5      nS	 n[        R
                  " [        T5      S:¬  TU[         R                  S-  S-  S
9n	Sn
S n[        R
                  " [        T5      U
:¬  TU[        * S
9n[         R                  " TS:  [         R                  U* 5      n[         R                  " TS:  [         R                  US-  U	-  5      nS nS[         R                  " S5      -  [        -  [         R                  S-  -  nX4XW4n[        R
                  " [        T5      U
S-  :„  T/UQ7UUS
9nS nX4XVU4n[        R
                  " [        T5      U
S-  :„  T/UQ7USS
9nXÞUU4$ )Nc                 ó<   >• [         R                  " U T-  S-   5      $ ra   r@  )re   rj  s    €r6   ÚgÚ genextreme_gen._stats.<locals>.gn  s   ø€ Ü—8’8˜A ™E A™IÓ&Ð&r8   r   rW   rÌ  rU  gH¯¼šò×z>rÑ   rc  c                 ó¨   • [         R                  " [         R                  " SU -  S-   5      S[         R                  " U S-   5      -  -
  5      U S-  -  $ )NrÑ   r•   rW   ©r~   rt  r  r¬  s    r6   Úgam2k_fÚ&genextreme_gen._stats.<locals>.gam2k_fu  sB   € Ü—8’8œBŸJšJ s¨1¡u¨S¡yÓ1°!´B·J²J¸qÀ3¹wÓ4GÑ2GÑGÓHÈÈCÉÑOÐOr8   r  ç›+¡†›„=c                 ób   • [         R                  " [         R                  " U S-   5      5      U -  $ ra   rm  r¬  s    r6   Úgamk_fÚ%genextreme_gen._stats.<locals>.gamk_fy  s#   € Ü—8’8œBŸJšJ q¨1¡uÓ-Ó.¨qÑ0Ð0r8   r­  r@  c                 ó`   • S n[         R                  " U S:¬  U /UQ7U[        R                  S9$ )Nc                 óZ   • [         R                  " U 5      U* USU-  -   U-  -   -  US-  -  $ ©NrW   rg  rP   )rj  r  r€  Úg3Úg2mg12s        r6   Ú
sk1_eval_fÚ;genextreme_gen._stats.<locals>.sk1_eval.<locals>.sk1_eval_f…  s2   € Ü—w’w˜q“z B 3¨"¨q°©x©-¸Ñ);Ñ#;Ñ<¸VÀS¹[ÑHÐHr8   r�  r  rí  )rj  rG   ry  s      r6   Úsk1_evalÚ'genextreme_gen._stats.<locals>.sk1_eval„  s2   € òIä—?’? 1¨¡:°¨z°D©zØ#-¼"¿&¹&ñBð Br8   r  rË  g�Âõ(\�Ò?c                 óV   • S n[         R                  " U S:¬  X[        R                  S9$ )Nc                 ó@   • USU-  SX-   -  U -  -   U -  -   US-  -  S-
  $ )Nrt  rÌ  rW   r�   )r  r€  rw  Úg4rx  s        r6   Ú
ku1_eval_fÚ;genextreme_gen._stats.<locals>.ku1_eval.<locals>.ku1_eval_f‘  s4   € Ø˜b ™e a¨©¡o°bÑ&8Ñ8¸"Ñ<Ñ<¸fÀa¹iÑGÈ!ÑKÐKr8   g      Ð¿r  rí  )rj  rG   r€  s      r6   Úku1_evalÚ'genextreme_gen._stats.<locals>.ku1_eval�  s#   € òLä—?’? 1¨¡:¨tÌBÏFÉFÑSÐSr8   gq=
×£pÍ?ç333333@)
rQ   rÃ  r  r  r#  r$  r$   rF  r&  r%   )rE   rj  rj  r  r€  rw  r  rx  rn  Úgam2kÚepsrr  Úgamkr  r%  r{  Úsk_fillrG   rØ  r‚  rÙ  s    `                   r6   r   Úgenextreme_gen._statsm  s¡  ø€ õ	'áˆq‹TˆÙˆq‹TˆÙˆq‹TˆÙˆq‹TˆÜ—’œ#˜a›& 4™-¨!¬B¯E©E©'°C©¸Ñ);¸RÀCÁ¹ZÓHˆò	Pä—’¤ A£¨$¡°°7ÄrÇuÁuÈcÁzÐRUÁ~ÑVˆØˆò	1ä�Šœs 1›v¨™}¨a°ÄVÀGÑLˆô �HŠH�Q˜‘XœrŸv™v¨ uÓ-ˆô �HŠH�Q˜‘XœrŸv™v r¨3¡w¨u¡}Ó5ˆò	Bð ”R—W’W˜Q“Z‘-¤Ñ&¤r§u¡u¨a¡xÑ/ˆØ˜Ð#ˆÜ�_Š_œS ›V c¨4¡iÑ/°!°°d±Ø%°'ñ;ˆò	Tð
 ˜ Ð'ˆÜ�_Š_œS ›V c¨4¡iÑ/°!°°d±Ø%°(ñ<ˆð �R˜ˆ|Ðr8   c                 ó–   >• [        U[        5      (       a  UR                  5       n[        U5      nUS:  a  SnOSn[        TU ]  X4S9$ )Nr   r£   r@  r‰  ©r?   r*   rÛ  r   rA   rÝ  )rE   rF   rj  r—   rÞ  s       €r6   rÝ  Úgenextreme_gen._fitstart›  sK   ø€ Ü�dœL×)Ñ)Ø—>‘>Ó#ˆDä�$‹KˆØˆq‹5Ø‰AàˆAÜ‰wÑ  ¨DÐ Ð1Ð1r8   c                 ó2  • [         R                  " SUS-   5      nSX!-  -  [         R                  " [        R                  " X5      SU-  -  [        R
                  " X#-  S-   5      -  SS9-  n[         R                  " X!-  S:„  U[         R                  5      $ )Nr   r   r•   r  r]  )rQ   rÁ  rî  r~   r  r6  rÃ  rm   )rE   re   rj  rz  Úvalss        r6   r+  Úgenextreme_gen._munp¦  s{   € Ü�IŠI�a˜˜1™ÓˆØ�1‘4‰xœ"Ÿ&š&Ü�GŠG�A‹M˜R !™GÑ#¤b§h¢h¨q©s°Q©wÓ&7Ñ7Øññ ˆô �xŠx˜™˜b™ $¬¯©Ó/Ð/r8   c                 ó    • [         SU-
  -  S-   $ ra   rÞ  r	  s     r6   r  Úgenextreme_gen._entropy­  s   € Ü�q˜1‘u‰~ Ñ!Ð!r8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   r¥   rF  rw   rü   r  r{   r€   r†   rŠ   r   rÝ  r+  r  r“   r-  r.  s   @r6   r7  r7    s[   ø† ñ%òLòKòò
ò*òò".ò*ò-òòò,õ\	2ò0÷"ð "r8   r7  Ú
genextremec                 óL  ^ • SnU 4S jnT S:”  a7  [         R                  " T 5      S-   nT S:  a  [        R                  " X#SS9nU$ O,T S:”  a  [         R                  " T S	-  5      S
-   nO	ST * U-
  -  n[        R                  " X#SSS9u  pEpgUS:w  a  [        ST < 35      eUS   $ )a2  Inverse of the digamma function (real positive arguments only).

This function is used in the `fit` method of `gamma_gen`.
The function uses either optimize.fsolve or optimize.newton
to solve `sc.digamma(x) - y = 0`.  There is probably room for
improvement, but currently it works over a wide range of y:

>>> import numpy as np
>>> rng = np.random.default_rng()
>>> y = 64*rng.standard_normal(1000000)
>>> y.min(), y.max()
(-311.43592651416662, 351.77388222276869)
>>> x = [_digammainv(t) for t in y]
>>> np.abs(sc.digamma(x) - y).max()
1.1368683772161603e-13

g¶oüŒxâ?c                 ó6   >• [         R                  " U 5      T-
  $ rO   )r~   rn  r�  s    €r6   rœ  Ú_digammainv.<locals>.funcÈ  s   ø€ Ü�zŠz˜!‹}˜qÑ Ð r8   g      À¿r£   r  ç»½×Ùß|Û=)Útolrs  g-²�ï§@gë­�­,¶?r•   ç•dyáý¥=T)Úxtolré  r   z _digammainv: fsolve failed, y = r   )rQ   rÒ   r   ÚnewtonrÜ  ÚRuntimeError)r�  Ú_emrœ  Úx0Úvaluerò  ró  r”  s   `       r6   Ú_digammainvrŸ  ´  s¸   ø€ ð$ &€Cõ!ð 	ˆ6ƒzÜ�VŠV�A‹Y˜‰_ˆØˆr‹6ô —O’O D°%Ñ8ˆEØˆLð ð 
ˆR‹Ü�VŠV�A�e‘G‹_˜wÑ&‰à�Q�B˜‘HÑˆä%Ÿ_š_¨T¸EØ9=ñ?Ñ€E�à
ˆaƒxÜÐ=¸a¹UÐCÓDÐDà�‰8€Or8   c                   ó’   ^ • \ rS rSrSrS rSS jrS rS rS r	S r
S	 rS
 rS rS rS rU 4S jr\" \SS9U 4S j5       rSrU =r$ )Ú	gamma_geniæ  a3  A gamma continuous random variable.

%(before_notes)s

See Also
--------
erlang, expon

Notes
-----
The probability density function for `gamma` is:

.. math::

    f(x, a) = \frac{x^{a-1} e^{-x}}{\Gamma(a)}

for :math:`x \ge 0`, :math:`a > 0`. Here :math:`\Gamma(a)` refers to the
gamma function.

`gamma` takes ``a`` as a shape parameter for :math:`a`.

When :math:`a` is an integer, `gamma` reduces to the Erlang
distribution, and when :math:`a=1` to the exponential distribution.

Gamma distributions are sometimes parameterized with two variables,
with a probability density function of:

.. math::

    f(x, \alpha, \beta) =
    \frac{\beta^\alpha x^{\alpha - 1} e^{-\beta x }}{\Gamma(\alpha)}

Note that this parameterization is equivalent to the above, with
``scale = 1 / beta``.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r2  rl   rn   s    r6   ro   Úgamma_gen._shape_info  r5  r8   c                 ó$   • UR                  X5      $ rO   ©Ústandard_gamma)rE   r—   ró   rô   s       r6   rõ   Úgamma_gen._rvs  s   € Ø×*Ñ*¨1Ó3Ð3r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  r8  s      r6   rw   Úgamma_gen._pdf  r³  r8   c                 ój   • [         R                  " US-
  U5      U-
  [         R                  " U5      -
  $ r>  )r~   r¹  r  r8  s      r6   rü   Úgamma_gen._logpdf  s)   € Ü�xŠx˜˜#™˜qÓ! AÑ%¬¯
ª
°1«Ñ5Ð5r8   c                 ó.   • [         R                  " X!5      $ rO   rU  r8  s      r6   r{   Úgamma_gen._cdf  rŒ   r8   c                 ó.   • [         R                  " X!5      $ rO   rY  r8  s      r6   r€   Úgamma_gen._sf  s   € Ü�|Š|˜AÓ!Ð!r8   c                 ó.   • [         R                  " X!5      $ rO   r“  rA  s      r6   r†   Úgamma_gen._ppf"  s   € Ü�~Š~˜aÓ#Ð#r8   c                 ó.   • [         R                  " X!5      $ rO   ©r~   rd  rA  s      r6   rŠ   Úgamma_gen._isf%  s   € Ü�Š˜qÓ$Ð$r8   c                 ó@   • XS[         R                  " U5      -  SU-  4$ )NrÑ   rc  rÍ  rG  s     r6   r   Úgamma_gen._stats(  s   € Ø�SœŸš ›‘^ S¨¡UÐ*Ð*r8   c                 ó.   • [         R                  " X!5      $ rO   ©r~   rh  ©rE   re   r—   s      r6   r+  Úgamma_gen._munp+  s   € Ü�wŠw�q‹}Ðr8   c                 óD   • S nS n[         R                  " US:  XU5      $ )Nc                 ón   • [         R                  " U 5      SU -
  -  U -   [         R                  " U 5      -   $ ra   ©r~   r™  r  ©r—   s    r6   rp  Ú+gamma_gen._entropy.<locals>.regular_formula0  s+   € Ü—6’6˜!“9  !¡Ñ$ qÑ(¬2¯:ª:°a«=Ñ8Ð8r8   c                 óÒ   • SS[         R                  " S[         R                  -  5      -   [         R                  " U 5      -   -  SSU -  -  -
  U S-  S-  -
  U S-  S	-  -
  U S
-  S-  -   $ )Nr£   r•   rW   r   rÌ  rþ  r  rÿ  r½  r   r  r  r¾  s    r6   rv  Ú.gamma_gen._entropy.<locals>.asymptotic_formula3  sq   € ð
 ˜2¤§¢ q¬¯©¡w£Ñ/´"·&²&¸³)Ñ;Ñ<¸qÀ!ÀaÁ%¹yÑHØ˜#‘v˜r‘kñ"Ø%&¨¡V¨R¡Kñ0Ø34°c±6¸3±,ñ?ð @r8   éú   rK  )rE   r—   rp  rv  s       r6   r  Úgamma_gen._entropy.  s'   € ò	9ò	@ô �Š˜q 3™w¨Ð<NÓOÐOr8   c                 ó–   >• [        U[        5      (       a  UR                  5       n[        U5      nSSUS-  -   -  n[        TU ]  X4S9$ )NrU  ç:Œ0âŽyE>rW   r‰  r‹  )rE   rF   rØ  r—   rÞ  s       €r6   rÝ  Úgamma_gen._fitstart=  sN   ø€ ô �dœL×)Ñ)Ø—>‘>Ó#ˆDÜ�4‹[ˆØ�˜˜A™‘ÑˆÜ‰wÑ  ¨DÐ Ð1Ð1r8   a<          When the location is fixed by using the argument `floc`
        and `method='MLE'`, this
        function uses explicit formulas or solves a simpler numerical
        problem than the full ML optimization problem.  So in that case,
        the `optimizer`, `loc` and `scale` arguments are ignored.
        

r  c                 ó  >^• UR                  SS 5      nUR                  SS5      n[        U[        5      (       d  Uc(  UR                  5       S:w  a  [        TU ]  " U/UQ70 UD6$ UR                  SS 5        [        U/ SQ5      nUR                  SS 5      n[        U5        Ub  Ub  Ub  [        S5      e[        R                  " U5      n[        R                  " U5      R                  5       (       d  [        S5      eUR                  5       S:X  a¶  [        R                  " U5      n[        R                  " U5      n	[        R                  " X-
  S	-  5      n
XdUpÜnUc  Uc  Uc  U
S
U	-  -  nUc  Uc  [        R                   " X›-  5      nUc
  Uc  X˜U-
  -  nUc
  Uc  X�S
-  -  nUc  XŒ-
  U-  nUc  X‹U-  -
  nUc  XŒ-
  U-  nX¼U4$ [        R"                  " X:*  5      (       a  [%        SU[        R&                  S9eUS:w  a  X-
  nUR                  5       nUc™  Ub  UnOŽ[        R(                  " U5      [        R(                  " U5      R                  5       -
  mS	T-
  [        R                   " TS	-
  S
-  ST-  -   5      -   ST-  -  nUS-  nUS-  n[*        R,                  " U4S jUUSS9nXë-  nOH[        R(                  " U5      R                  5       [        R(                  " U5      -
  n[/        U5      nUnX´U4$ )Nr  r1   r;   r<   rá  r  r  r   rÌ  rW   r6  rè  r   r{  r  g333333ã?gffffffö?c                 ód   >• [         R                  " U 5      [        R                  " U 5      -
  T-
  $ rO   )rQ   r  r~   rn  )r—   rx  s    €r6   r  Úgamma_gen.fit.<locals>.<lambda>§  s   ø€ ¬b¯fªf°Q«i¼"¿*º*ÀQ»-Ñ.GÈ!Ò.Kr8   )Údisp)r=   r?   r*   r>   rA   rC   r3   r   r7   r!  rQ   r"  r#  r$  r%  rð  r&  rì  r‡  rm   r  r   ÚbrentqrŸ  )rE   rF   rG   r5   r  r1   râ  r  Úm1Úm2Úm3r—   r.   r/   rñ  ÚaestÚxar¶  rj  rx  rÞ  s                      @€r6   rC   Úgamma_gen.fitI  sà  ù€ ð �x‰x˜ Ó%ˆØ—‘˜( EÓ*ˆä�tœ\×*Ñ*Ø‘ §¡£°4Ó!7ô ‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ð 	�‰�˜Ôä! $Ò(=Ó>ˆØ—‘˜( DÓ)ˆä$ TÔ*à‰>˜dÑ.°6Ñ3Eô ð )ó *ð *ô �zŠz˜$Óˆä�{Š{˜4Ó ×$Ñ$×&Ñ&ÜÐCÓDÐDð �<‰<‹>˜TÓ!Ü—’˜“ˆBÜ—’˜“ˆBÜ—’˜$™)¨Ñ)Ó*ˆBØ f�EˆAà‰y˜S™[¨U©]Ø˜a "™f™�à‰{˜u™}ÜŸš ¡›�Ø‰y˜U™]Ø 3™h™�Ø‰y˜S™[Ø 1™*Ñ%�à‰yØ‘X Ñ&�Ø‰{Ø˜u™9‘n�Ø‰}Ø™ Q™�Ø˜5�=Ð ô
 �6Š6�$‘,×ÑÜ˜w¨d¼"¿&¹&ÑAÐAà�1‹9ð ‘;ˆDØ�y‰y‹{ˆð ‰>à‰~à‘ô —F’F˜4“L¤2§6¢6¨$£<×#4Ñ#4Ó#6Ñ6�Ø˜!™œbŸgšg q¨¡s¨Q¡h°°A±¡oÓ6Ñ6¸2¸a¹4Ñ@�Ø˜5‘\�Ø˜5‘\�Ü—O’OÔ$KØ$&¨°ñ4�ð
 ‘H‰Eô
 —’�t“×!Ñ!Ó#¤b§f¢f¨V£nÑ4ˆAÜ˜A“ˆAØˆEà˜ˆ~Ðr8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r€   r†   rŠ   r   r+  r  rÝ  r	   r   rC   r“   r-  r.  s   @r6   r¡  r¡  æ  si   ø† ñ'òPEô4ò*ò6ò!ò"ò$ò%ò+òòPõ
2ñ ˜}ð 5ñ ôeóöer8   r¡  r6  c                   óX   ^ • \ rS rSrSrS rS rU 4S jr\" \	SS9U 4S j5       r
S	rU =r$ )
Ú
erlang_geni»  a�  An Erlang continuous random variable.

%(before_notes)s

See Also
--------
gamma

Notes
-----
The Erlang distribution is a special case of the Gamma distribution, with
the shape parameter `a` an integer.  Note that this restriction is not
enforced by `erlang`. It will, however, generate a warning the first time
a non-integer value is used for the shape parameter.

Refer to `gamma` for examples.

c                 ó¶   • [         R                  " [         R                  " U5      U:H  5      nU(       d!  SU< S3n[        R                  " U[
        SS9  US:„  $ )NzRThe shape parameter of the erlang distribution has been given a non-integer value r2   rÌ  ©Ú
stacklevelr   )rQ   r$  r!  ÚwarningsÚwarnÚRuntimeWarning)rE   r—   ÚallintÚmessages       r6   rf   Úerlang_gen._argcheckÏ  sM   € Ü—’œŸš › qÑ(Ó)ˆÞð=Ø=>¹EÀðDˆGä�MŠM˜'¤>¸aÒ@Ø�1‰uˆr8   c                 ó@   • [        SSS[        R                  4S5      /$ )Nr—   Tr   rk   rl   rn   s    r6   ro   Úerlang_gen._shape_infoÙ  rq   r8   c                 ó¬   >• [        U[        5      (       a  UR                  5       n[        SS[	        U5      S-  -   -  5      n[
        [        U ]  X4S9$ )Nr¾  rÅ  rW   r‰  )r?   r*   rÛ  r*  r   rA   r¡  rÝ  )rE   rF   r—   rÞ  s      €r6   rÝ  Úerlang_gen._fitstartÜ  sQ   ø€ ô �dœL×)Ñ)Ø—>‘>Ó#ˆDÜ��tœe D›k¨1™nÑ,Ñ-Ó.ˆÜ”Y Ñ/°¸4Ð/Ð@Ð@r8   a¦          The Erlang distribution is generally defined to have integer values
        for the shape parameter.  This is not enforced by the `erlang` class.
        When fitting the distribution, it will generally return a non-integer
        value for the shape parameter.  By using the keyword argument
        `f0=<integer>`, the fit method can be constrained to fit the data to
        a specific integer shape parameter.r  c                 ó,   >• [         TU ]  " U/UQ70 UD6$ rO   )rA   rC   ©rE   rF   rG   r5   rÞ  s       €r6   rC   Úerlang_gen.fitç  s   ø€ ô ‰wŠ{˜4Ð/ $Ò/¨$Ñ/Ð/r8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   rÝ  r	   r   rC   r“   r-  r.  s   @r6   rÓ  rÓ  »  s9   ø† ñò&òCõAñ ˜}ð 5/ñ 0ô0ó0ö0r8   rÓ  Úerlangc                   ó^   • \ rS rSrSrS rS rS rS rS r	SS	 jr
S
 rS rS rS rS rSrg)Úgengamma_geniõ  aq  A generalized gamma continuous random variable.

%(before_notes)s

See Also
--------
gamma, invgamma, weibull_min

Notes
-----
The probability density function for `gengamma` is ([1]_):

.. math::

    f(x, a, c) = \frac{|c| x^{c a-1} \exp(-x^c)}{\Gamma(a)}

for :math:`x \ge 0`, :math:`a > 0`, and :math:`c \ne 0`.
:math:`\Gamma` is the gamma function (`scipy.special.gamma`).

`gengamma` takes :math:`a` and :math:`c` as shape parameters.

%(after_notes)s

References
----------
.. [1] E.W. Stacy, "A Generalization of the Gamma Distribution",
   Annals of Mathematical Statistics, Vol 33(3), pp. 1187--1192.

%(example)s

c                 ó   • US:„  US:g  -  $ rö  r�   )rE   r—   rj  s      r6   rf   Úgengamma_gen._argcheck  s   € Ø�A‘˜!˜q™&Ñ!Ð!r8   c                 óž   • [        SSS[        R                  4S5      n[        SS[        R                  * [        R                  4S5      nX/$ r•  rl   r–  s      r6   ro   Úgengamma_gen._shape_info  ó@   € Ü˜˜U Q¬¯© K°Ó@ˆÜ˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆØˆxˆr8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  r™  s       r6   rw   Úgengamma_gen._pdf  ó   € Ü�vŠv�d—l‘l 1¨Ó+Ó,Ð,r8   c                 óf   • [         R                  " US:g  US:„  -  XU4S [        R                  * S9$ )Nr   c                 ó²   • [         R                  " [        U5      5      [        R                  " X-  S-
  U 5      -   X-  -
  [        R
                  " U5      -
  $ ra   )rQ   r  r  r~   r¹  r  )rv   rj  r—   s      r6   r  Ú&gengamma_gen._logpdf.<locals>.<lambda>#  s@   € œRŸVšV¤C¨£F›^¬b¯hªh°q±s¸Q±wÀÓ.BÑBØ ™tñ$Ü&(§j¢j°£mò4r8   r  rc  r™  s       r6   rü   Úgengamma_gen._logpdf   s7   € Ü�ŠØ�!‰V˜˜A™Ñ  q 	ñ5äŸ™�wñ	 ð 	 r8   c                 ó–   • X-  n[         R                  " X$5      n[         R                  " X$5      n[        R                  " US:„  XV5      $ rö  ©r~   rV  rZ  rQ   rÃ  ©rE   rv   r—   rj  ÚxcÚval1Úval2s          r6   r{   Úgengamma_gen._cdf'  ó:   € Ø‰TˆÜ�{Š{˜1Ó!ˆÜ�|Š|˜AÓ"ˆÜ�xŠx˜˜A™˜tÓ*Ð*r8   Nc                 ó0   • UR                  XS9nUSU-  -  $ )NrÊ  r•   r¥  )rE   r—   rj  ró   rô   rW  s         r6   rõ   Úgengamma_gen._rvs-  s#   € Ø×'Ñ'¨Ð'Ð5ˆØ�2�a‘4‰yÐr8   c                 ó–   • X-  n[         R                  " X$5      n[         R                  " X$5      n[        R                  " US:„  Xe5      $ rö  rô  rõ  s          r6   r€   Úgengamma_gen._sf1  rú  r8   c                 óš   • [         R                  " X!5      n[         R                  " X!5      n[        R                  " US:„  XE5      SU-  -  $ r=  ©r~   r_  rd  rQ   rÃ  ©rE   r…   r—   rj  r÷  rø  s         r6   r†   Úgengamma_gen._ppf7  ó<   € Ü�~Š~˜aÓ#ˆÜ�Š˜qÓ$ˆÜ�xŠx˜˜A™˜tÓ*¨S°©UÑ3Ð3r8   c                 óš   • [         R                  " X!5      n[         R                  " X!5      n[        R                  " US:„  XT5      SU-  -  $ r=  r   r  s         r6   rŠ   Úgengamma_gen._isf<  r  r8   c                 ó:   • [         R                  " X!S-  U-  5      $ r>  r¸  )rE   re   r—   rj  s       r6   r+  Úgengamma_gen._munpA  s   € ä�wŠw�q˜C™% ™'Ó"Ð"r8   c                 óF   • S nS n[         R                  " US:¬  X4XC5      $ )Nc                 óÀ   • [         R                  " U 5      nU SU-
  -  X!-  -   n[         R                  " U 5      [        R                  " [        U5      5      -
  nX4-   nU$ ra   )r~   r™  r  rQ   r  r  )r—   rj  r¶  ÚAÚBrž  s         r6   rù  Ú&gengamma_gen._entropy.<locals>.regularF  sM   € Ü—&’&˜“)ˆCØ�Q˜‘W‘ ¡Ñ'ˆAÜ—
’
˜1“¤§¢¤s¨1£v£Ñ.ˆAØ‘ˆAØˆHr8   c                 óB  • [         R                  5       [        R                  " U 5      S-  -
  [        R                  " [        R                  " U5      5      -
  U S-  S-  -   U S-  S-  -
  [        R                  " U 5      U S-  S-  -
  U S-  S-  -
  U S-  S	-  -   U-  -   $ )
NrW   r­  rË  rÿ  r½  rþ  r  r   r  )r.  r  rQ   r  r  )r—   rj  s     r6   Ú
asymptoticÚ)gengamma_gen._entropy.<locals>.asymptoticM  s™   € ä—M‘M“O¤b§f¢f¨Q£i°¡kÑ1Ü—f’fœRŸVšV A›YÓ'ñ(Ø+,¨c©6°1©*ñ5Ø89¸3¹À±{ñCä—v’v˜a“y A s¡F¨A¡:Ñ-°°C±¸±Ñ;¸qÀ#¹vÀs¹lÑJÈAÑMñNð Or8   éÈ   rK  )rE   r—   rj  rù  r  s        r6   r  Úgengamma_gen._entropyE  s(   € ò	ò	Oô �Š˜q C™x¨!¨°ÓEÐEr8   r�   r-  )rŽ   r�   r�   r‘   r’   rf   ro   rw   rü   r{   rõ   r€   r†   rŠ   r+  r  r“   r�   r8   r6   ræ  ræ  õ  s?   † ñò>"òò
-ò ò+ôò+ò4ò
4ò
#õFr8   ræ  Úgengammac                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)Úgenhalflogistic_geniY  au  A generalized half-logistic continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `genhalflogistic` is:

.. math::

    f(x, c) = \frac{2 (1 - c x)^{1/(c-1)}}{[1 + (1 - c x)^{1/c}]^2}

for :math:`0 \le x \le 1/c`, and :math:`c > 0`.

`genhalflogistic` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úgenhalflogistic_gen._shape_infoo  r5  r8   c                 ó$   • U R                   SU-  4$ r>  r¾  r	  s     r6   r¥   Ú genhalflogistic_gen._get_supportr  s   € Ø�v‰v�s˜1‘uˆ}Ðr8   c                 ót   • SU-  n[         R                  " SX!-  -
  5      nXCS-
  -  nXT-  nSU-  SU-   S-  -  $ rõ  ©rQ   r"  )rE   rv   rj  ÚlimitrÙ  Útmp0Útmp2s          r6   rw   Úgenhalflogistic_gen._pdfu  sJ   € ð �A‘ˆÜ�jŠj˜˜1™3™ÓˆØ˜1‘W‰~ˆØ‰xˆØ�‰v˜˜4™ !™Ñ#Ð#r8   c                 ó`   • SU-  n[         R                  " SX!-  -
  5      nXC-  nSU-
  SU-   -  $ r“  r  )rE   rv   rj  r  rÙ  r  s         r6   r{   Úgenhalflogistic_gen._cdf~  s9   € Ø�A‘ˆÜ�jŠj˜˜1™3™ÓˆØ‰|ˆØ�D‘˜Q˜t™VÑ$Ð$r8   c                 ó0   • SU-  SSU-
  SU-   -  U-  -
  -  $ r“  r�   ru  s      r6   r†   Úgenhalflogistic_gen._ppf„  s'   € Ø�1‰u�a˜#˜a™% # a¡%™¨1Ñ,Ñ,Ñ-Ð-r8   c                 óF   • SSU-  S-   [         R                  " S5      -  -
  $ r  rg  r	  s     r6   r  Úgenhalflogistic_gen._entropy‡  s"   € Ø�A�a‘C˜‘Eœ2Ÿ6š6 !›9Ñ$Ñ$Ð$r8   r�   N)rŽ   r�   r�   r‘   r’   ro   r¥   rw   r{   r†   r  r“   r�   r8   r6   r  r  Y  s&   † ñò*Eòò$ò%ò.õ%r8   r  Úgenhalflogisticc                   ó|   ^ • \ rS rSrSrS rS rU 4S jrS rS r	S \
S	 5       5       rS
 rS rSS jrS rSrU =r$ )Úgenhyperbolic_geniŽ  u	  A generalized hyperbolic continuous random variable.

%(before_notes)s

See Also
--------
t, norminvgauss, geninvgauss, laplace, cauchy

Notes
-----
The probability density function for `genhyperbolic` is:

.. math::

    f(x, p, a, b) =
        \frac{(a^2 - b^2)^{p/2}}
        {\sqrt{2\pi}a^{p-1/2}
        K_p\Big(\sqrt{a^2 - b^2}\Big)}
        e^{bx} \times \frac{K_{p - 1/2}
        (a \sqrt{1 + x^2})}
        {(\sqrt{1 + x^2})^{1/2 - p}}

for :math:`x, p \in ( - \infty; \infty)`,
:math:`|b| < a` if :math:`p \ge 0`,
:math:`|b| \le a` if :math:`p < 0`.
:math:`K_{p}(.)` denotes the modified Bessel function of the second
kind and order :math:`p` (`scipy.special.kv`)

`genhyperbolic` takes ``p`` as a tail parameter,
``a`` as a shape parameter,
``b`` as a skewness parameter.

%(after_notes)s

The original parameterization of the Generalized Hyperbolic Distribution
is found in [1]_ as follows

.. math::

    f(x, \lambda, \alpha, \beta, \delta, \mu) =
       \frac{(\gamma/\delta)^\lambda}{\sqrt{2\pi}K_\lambda(\delta \gamma)}
       e^{\beta (x - \mu)} \times \frac{K_{\lambda - 1/2}
       (\alpha \sqrt{\delta^2 + (x - \mu)^2})}
       {(\sqrt{\delta^2 + (x - \mu)^2} / \alpha)^{1/2 - \lambda}}

for :math:`x \in ( - \infty; \infty)`,
:math:`\gamma := \sqrt{\alpha^2 - \beta^2}`,
:math:`\lambda, \mu \in ( - \infty; \infty)`,
:math:`\delta \ge 0, |\beta| < \alpha` if :math:`\lambda \ge 0`,
:math:`\delta > 0, |\beta| \le \alpha` if :math:`\lambda < 0`.

The location-scale-based parameterization implemented in
SciPy is based on [2]_, where :math:`a = \alpha\delta`,
:math:`b = \beta\delta`, :math:`p = \lambda`,
:math:`scale=\delta` and :math:`loc=\mu`

Moments are implemented based on [3]_ and [4]_.

For the distributions that are a special case such as Student's t,
it is not recommended to rely on the implementation of genhyperbolic.
To avoid potential numerical problems and for performance reasons,
the methods of the specific distributions should be used.

References
----------
.. [1] O. Barndorff-Nielsen, "Hyperbolic Distributions and Distributions
   on Hyperbolae", Scandinavian Journal of Statistics, Vol. 5(3),
   pp. 151-157, 1978. https://www.jstor.org/stable/4615705

.. [2] Eberlein E., Prause K. (2002) The Generalized Hyperbolic Model:
    Financial Derivatives and Risk Measures. In: Geman H., Madan D.,
    Pliska S.R., Vorst T. (eds) Mathematical Finance - Bachelier
    Congress 2000. Springer Finance. Springer, Berlin, Heidelberg.
    :doi:`10.1007/978-3-662-12429-1_12`

.. [3] Scott, David J, WÃ¼rtz, Diethelm, Dong, Christine and Tran,
   Thanh Tam, (2009), Moments of the generalized hyperbolic
   distribution, MPRA Paper, University Library of Munich, Germany,
   https://EconPapers.repec.org/RePEc:pra:mprapa:19081.

.. [4] E. Eberlein and E. A. von Hammerstein. Generalized hyperbolic
   and inverse Gaussian distributions: Limiting cases and approximation
   of processes. FDM Preprint 80, April 2003. University of Freiburg.
   https://freidok.uni-freiburg.de/fedora/objects/freidok:7974/datastreams/FILE1/content

%(example)s

c                 óÈ   • [         R                  " [         R                  " U5      U:  US:¬  5      [         R                  " [         R                  " U5      U:*  US:  5      -  $ rö  )rQ   Úlogical_andr  )rE   rV  r—   r˜   s       r6   rf   Úgenhyperbolic_gen._argcheckè  sH   € Ü—’œrŸvšv a›y¨1™}¨a°1©fÓ5Ü—.’.¤§¢¨£¨a¡°°Q±Ó7ñ8ð 	9r8   c                 óú   • [        SS[        R                  * [        R                  4S5      n[        SSS[        R                  4S5      n[        SS[        R                  * [        R                  4S5      nXU/$ )NrV  Fr3  r—   r   rk   r˜   rl   )rE   Úipr§  r¨  s       r6   ro   Úgenhyperbolic_gen._shape_infoì  sb   € Ü˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆÜ˜˜U Q¬¯© K°Ó?ˆÜ˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆØ˜ˆ|Ðr8   c                 ó    >• [         TU ]  USS9$ )N)r   r   r£   r‰  r  r€  s     €r6   rÝ  Úgenhyperbolic_gen._fitstartò  s   ø€ ô ‰wÑ  ¨KÐ Ð8Ð8r8   c                 ó@   • [         R                  S 5       nU" XX45      $ )Nc                 ó0   • [         R                  " XX#5      $ rO   )r   Úgenhyperbolic_logpdf©rv   rV  r—   r˜   s       r6   Ú_logpdf_singleÚ1genhyperbolic_gen._logpdf.<locals>._logpdf_singleú  s   € ä×.Ò.¨q°QÓ:Ð:r8   ©rQ   Ú	vectorize)rE   rv   rV  r—   r˜   r4  s         r6   rü   Úgenhyperbolic_gen._logpdf÷  s)   € ô 
�‰ñ	;ó 
ð	;ñ ˜a AÓ)Ð)r8   c                 ó@   • [         R                  S 5       nU" XX45      $ )Nc                 ó0   • [         R                  " XX#5      $ rO   )r   Úgenhyperbolic_pdfr3  s       r6   Ú_pdf_singleÚ+genhyperbolic_gen._pdf.<locals>._pdf_single  s   € ä×+Ò+¨A°!Ó7Ð7r8   r6  )rE   rv   rV  r—   r˜   r<  s         r6   rw   Úgenhyperbolic_gen._pdf   s)   € ô 
�‰ñ	8ó 
ð	8ñ ˜1 Ó&Ð&r8   c                 óJ   • [         R                  " U [         R                  /S9$ )N©Úotypes©rQ   r7  Úfloat64)rœ  s    r6   r  Úgenhyperbolic_gen.<lambda>  s   € ”"—,’,˜t¬R¯Z©Z¨LÒ9r8   c           	      óÂ  • [         R                  " X#U/[        5      R                  R	                  [        R
                  5      n[        R                  " [        SU5      n[         R                  " X4-   X4-
  -  5      nXG-  [        R                  " US-   U5      -  [        R                  " X'5      -  nSn	Sn
Xs=:  a  U:  a7  O  O4[        R                  " X`UXšS9S   [        R                  " XhUXšS9S   -   nO[        R                  " X`UXšS9S   n[         R                  " U5      (       a  Sn[        R                   " U["        SS9  [%        S	['        S
U5      5      $ )z¨
Integrate the pdf of the genhyberbolic distribution from x0 to x1.
This is a private function used by _cdf() and _sf() only; either x0
will be -inf or x1 will be inf.
Ú_genhyperbolic_pdfr   r–  r   )ÚepsrelÚepsabszdInfinite values encountered in scipy.special.kve. Values replaced by NaN to avoid incorrect results.rÌ  rÕ  r”   r•   )rQ   Úarrayr  ÚctypesÚdata_asÚc_void_pr   Úfrom_cythonr   r&  r~   Úkvr   ÚquadÚisnanr×  rØ  rÙ  Úmaxrk  )r�  r  rV  r—   r˜   Ú	user_dataÚllcr'  r%  rG  rH  Úintgrlr[   s                r6   Ú_integrate_pdfÚ genhyperbolic_gen._integrate_pdf  s5  € ô —H’H˜a A˜Y¬Ó.×5Ñ5×=Ñ=¼f¿o¹oÓNˆ	Ü×*Ò*¬6Ð3GØ+4ó6ˆä�GŠG�Q‘U˜Q™U‘OÓ$ˆØ‰s”R—U’U˜1˜q™5 !“_Ñ$¤r§u¢u¨Q£{Ñ2ˆØˆØˆØ�>�rŽ>ô  —n’n S¨dØ,2ñCØCDñFä!Ÿš s°"Ø.4ñEØEFñHñH‰Fô
 —^’^ C¨RØ+1ñBØBCñEˆFä�8Š8�F×ÑðHˆCä�MŠM˜#œ~¸!Ò<Ü�3œ˜C Ó(Ó)Ð)r8   c                 óF   • U R                  [        R                  * XX45      $ rO   ©rU  rQ   rm   ©rE   rv   rV  r—   r˜   s        r6   r{   Úgenhyperbolic_gen._cdf.  s   € Ø×"Ñ"¤B§F¡F 7¨A°!Ó7Ð7r8   c                 óF   • U R                  U[        R                  X#U5      $ rO   rX  rY  s        r6   r€   Úgenhyperbolic_gen._sf1  s   € Ø×"Ñ" 1¤b§f¡f¨a°AÓ6Ð6r8   c                 óL  • [         R                  " US5      [         R                  " US5      -
  n[         R                  " US5      n[         R                  " US5      n[        R                  UUUUUS9n	[        R                  XES9n
X9-  [         R
                  " U	5      U
-  -   $ )NrW   r£   r@  )rV  r˜   r/   ró   rô   r5  )rQ   Úfloat_powerÚgeninvgaussr7  r.  r&  )rE   rV  r—   r˜   ró   rô   r  r  r  ÚgigÚnormsts              r6   rõ   Úgenhyperbolic_gen._rvs4  s’   € ô
 �^Š^˜A˜qÓ!¤B§N¢N°1°aÓ$8Ñ8ˆä�^Š^˜B Ó$ˆä�^Š^˜B Ó&ˆÜ�o‰oØØØØØ%ð ð ˆô —‘˜t�Ð?ˆà‰wœŸš ›¨Ñ.Ñ.Ð.r8   c                 óà  ^• [         R                  " XU5      u  pn[         R                  " US5      [         R                  " US5      -
  n[         R                  " US5      n[         R                  " SS5      [         R                  " US5      -  n[         R                  " SSS5      nUR	                  UR
                  SUR                  -  -   5      n[        R                  " X-   U5      u  mpxpšU4S	 jXxXš4 5       u  p¼pÞX5-  U-  nX[-  [         R                  " US5      [         R                  " US5      -  U[         R                  " US5      -
  -  -   n[         R                  " US
5      [         R                  " US
5      -  US
U-  U-  [         R                  " TS5      -  -
  S[         R                  " US
5      -  -   -  S
U-  [         R                  " US5      -  U[         R                  " US5      -
  -  -   nU[         R                  " US5      -  n[         R                  " US5      [         R                  " US5      -  USU	-  U-  [         R                  " TS5      -  -
  SU-  [         R                  " US5      -  [         R                  " TS5      -  -   S
[         R                  " US5      -  -
  -  [         R                  " US5      [         R                  " US
5      -  SU-  SU-  U-  [         R                  " TS5      -  -
  S[         R                  " US
5      -  -   -  -   S
[         R                  " US5      -  U-  -   nU[         R                  " US5      -  S
-
  nUUUU4$ )NrW   r£   r   r  r   rU  r¶  )r   c              3   ó,   >#   • U  H	  oT-  v •  M     g 7frO   r�   )Ú.0r˜   Úb0s     €r6   Ú	<genexpr>Ú+genhyperbolic_gen._stats.<locals>.<genexpr>U  s   øé € Ð;Ò*: Q˜bž&Ò*:ùs   ƒrÌ  r;  r{  rË  rs  r  )	rQ   rS  r^  ÚlinspacerÂ  Úshaper•  r~   rN  )rE   rV  r—   r˜   r  r  ÚintegersÚb1Úb2Úb3Úb4Úr1Úr2Úr3Úr4r  r%  Úm3erx  Úm4erz  rf  s                        @r6   r   Úgenhyperbolic_gen._statsI  s  ø€ ô ×%Ò% a¨AÓ.‰ˆˆaÜ�^Š^˜A˜qÓ!¤B§N¢N°1°aÓ$8Ñ8ˆÜ�^Š^˜B Ó$ˆÜ�^Š^˜A˜qÓ!¤B§N¢N°2°sÓ$;Ñ;ˆÜ—;’;˜q ! QÓ'ˆà×#Ñ# H§N¡N°T¸A¿F¹F±]Ñ$BÓCˆÜŸUšU 1¡<°Ó4ÑˆˆB�BÜ;¨2°2Ñ*:Ó;‰ˆ�à‰F�R‰Kˆà‰G”b—n’n Q¨Ó*¬R¯^ª^¸BÀÓ-BÑBØ”"—.’.  QÓ'Ñ'ñ)ñ )ð 	
ô
 �NŠN˜1˜aÓ ¤2§>¢>°"°aÓ#8Ñ8Ø�!�b‘&˜2‘+¤§¢¨r°2Ó 6Ñ6Ñ6Ø”—’  AÓ&Ñ&ñ'ñ(ð �‰E”B—N’N 2 qÓ)Ñ)Ø”"—.’.  QÓ'Ñ'ñ)ñ)ð 	ð ”"—.’.  GÓ,Ñ,ˆä�NŠN˜1˜aÓ ¤2§>¢>°"°aÓ#8Ñ8Ø�!�b‘&˜2‘+¤§¢¨r°3Ó 7Ñ7Ñ7Ø�‰V”b—n’n R¨Ó+Ñ+¬b¯nªn¸RÀÓ.EÑEñFà”—’  AÓ&Ñ&ñ'ñ(ô �NŠN˜1˜aÓ ¤2§>¢>°"°aÓ#8Ñ8Ø�‰V�b˜2‘g ‘l¤R§^¢^°B¸Ó%<Ñ<Ñ<Ø”—’  AÓ&Ñ&ñ'ñ(ñ	(ð ”—’˜r 1Ó%Ñ%¨Ñ*ñ+ð 	ð ”"—.’.  BÓ'Ñ'¨!Ñ+ˆà�!�Q˜ˆzÐr8   r�   r-  )rŽ   r�   r�   r‘   r’   rf   ro   rÝ  rü   rw   ÚstaticmethodrU  r{   r€   rõ   r   r“   r-  r.  s   @r6   r'  r'  Ž  sY   ø† ñWòr9òõ9ò
*ò'ñ :Øñ*ó ó :ð*ò@8ò7ô/÷*'ð 'r8   r'  Úgenhyperbolicc                   óH   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rSrg)Úgompertz_geniv  aE  A Gompertz (or truncated Gumbel) continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `gompertz` is:

.. math::

    f(x, c) = c \exp(x) \exp(-c (e^x-1))

for :math:`x \ge 0`, :math:`c > 0`.

`gompertz` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úgompertz_gen._shape_infoŒ  r5  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rn  s      r6   rw   Úgompertz_gen._pdf�  r³  r8   c                 óh   • [         R                  " U5      U-   U[        R                  " U5      -  -
  $ rO   r(  rn  s      r6   rü   Úgompertz_gen._logpdf“  s%   € Ü�vŠv�a‹y˜1‰}˜q¤2§8¢8¨A£;™Ñ.Ð.r8   c                 ó`   • [         R                  " U* [         R                  " U5      -  5      * $ rO   rV  rn  s      r6   r{   Úgompertz_gen._cdf–  s#   € Ü—’˜!˜œbŸhšh q›kÑ)Ó*Ð*Ð*r8   c                 ód   • [         R                  " SU-  [         R                  " U* 5      -  5      $ r±  rm  ru  s      r6   r†   Úgompertz_gen._ppf™  s$   € Ü�xŠx˜˜q™¤2§8¢8¨Q¨B£<Ñ/Ó0Ð0r8   c                 ó^   • [         R                  " U* [        R                  " U5      -  5      $ rO   r¼  rn  s      r6   r€   Úgompertz_gen._sfœ  s    € Ü�vŠv�q�bœ2Ÿ8š8 A›;Ñ&Ó'Ð'r8   c                 ó^   • [         R                  " [        R                  " U5      * U-  5      $ rO   r¿  ©rE   rV  rj  s      r6   rŠ   Úgompertz_gen._isfŸ  s   € Ü�xŠxœŸš ›˜
 1™Ó%Ð%r8   c                 óz   • S[         R                  " U5      -
  [        R                  R	                  U5      U-  -
  $ r>  )rQ   r  r~   Ú_ufuncsÚ_scaled_exp1r	  s     r6   r  Úgompertz_gen._entropy¢  s-   € Ø”R—V’V˜A“Y‰¤§¡×!8Ñ!8¸Ó!;¸AÑ!=Ñ=Ð=r8   r�   N©rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   rŠ   r  r“   r�   r8   r6   rz  rz  v  s0   † ñò*Eò*ò/ò+ò1ò(ò&õ>r8   rz  Úgompertzc                 óÒ   • [         R                  " U 5      n [         R                  " U5      nUR                  5       n[         R                  " X-
  5      n[         R                  " XS9$ )N)Úweights)rQ   r"  rQ  rÒ   Úaverage)rv   Ú
logweightsÚmaxlogwr‘  s       r6   Ú_average_with_log_weightsr•  ©  sI   € Ü
�
Š
�1‹€AÜ—’˜JÓ'€JØ�n‰nÓ€GÜ�fŠf�ZÑ)Ó*€GÜ�:Š:�aÑ)Ð)r8   c                   óz   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS r\\" \5      S 5       5       rSrg)Úgumbel_r_geni±  aÐ  A right-skewed Gumbel continuous random variable.

%(before_notes)s

See Also
--------
gumbel_l, gompertz, genextreme

Notes
-----
The probability density function for `gumbel_r` is:

.. math::

    f(x) = \exp(-(x + e^{-x}))

for real :math:`x`.

The Gumbel distribution is sometimes referred to as a type I Fisher-Tippett
distribution.  It is also related to the extreme value distribution,
log-Weibull and Gompertz distributions.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úgumbel_r_gen._shape_infoÍ  r¼   r8   c                 óL   • [         R                  " U R                  U5      5      $ rO   r<  r¿   s     r6   rw   Úgumbel_r_gen._pdfÐ  ó   € ä�vŠv�d—l‘l 1“oÓ&Ð&r8   c                 ó8   • U* [         R                  " U* 5      -
  $ rO   rP  r¿   s     r6   rü   Úgumbel_r_gen._logpdfÔ  s   € Øˆr”B—F’F˜A˜2“J‰Ðr8   c                 óZ   • [         R                  " [         R                  " U* 5      * 5      $ rO   rP  r¿   s     r6   r{   Úgumbel_r_gen._cdf×  s   € Ü�vŠv”r—v’v˜q˜b“z�kÓ"Ð"r8   c                 ó2   • [         R                  " U* 5      * $ rO   rP  r¿   s     r6   r  Úgumbel_r_gen._logcdfÚ  s   € Ü—’˜�r“
ˆ{Ðr8   c                 óZ   • [         R                  " [         R                  " U5      * 5      * $ rO   rg  rÉ   s     r6   r†   Úgumbel_r_gen._ppfÝ  s   € Ü—’œŸš˜q›	�zÓ"Ð"Ð"r8   c                 ó\   • [         R                  " [        R                  " U* 5      * 5      * $ rO   r$  r¿   s     r6   r€   Úgumbel_r_gen._sfà  s    € Ü—’œ"Ÿ&š& ! ›*˜Ó%Ð%Ð%r8   c                 ó\   • [         R                  " [         R                  " U* 5      * 5      * $ rO   ©rQ   r  rï  r¸  s     r6   rŠ   Úgumbel_r_gen._isfã  s    € Ü—’œŸš ! ›�}Ó%Ð%Ð%r8   c                 ó¾   • [         [        R                  [        R                  -  S-  S[        R                  " S5      -  [        R                  S-  -  [        -  S4$ )Nrc  r  rË  rÌ  r„  ©r$   rQ   r  r&  r%   rn   s    r6   r   Úgumbel_r_gen._statsæ  s?   € Ü”r—u‘uœRŸU™U‘{ 3‘¨¬2¯7ª7°1«:©´b·e±e¸Q±hÑ(>ÄÑ(GÈÐOÐOr8   c                 ó   • [         S-   $ r>  rÞ  rn   s    r6   r  Úgumbel_r_gen._entropyé  s   € ä˜‰{Ðr8   c                 óà  ^^^• [        U TX#5      u  mpEU4S jnUb  UnU" U5      mTU4$ Ub
  UmUU4S jmOU4S jmUR                  SS5      nUS-  US-  p©U4S jnU" Xš5      (       dO  U	S:”  d  U
[        R                  :  a5  U	S-  n	U
S-  n
U" Xš5      (       d  U	S:”  a  M  U
[        R                  :  a  M5  [        R
                  " TXš4S	S	S
9nUR                  nUb  UOU" U5      mTU4$ )Nc                 ó€   >• U * [         R                  " T* U -  5      [        R                  " [	        T5      5      -
  -  $ rO   )r~   r  rQ   r  rí  )r/   rF   s    €r6   Úget_loc_from_scaleÚ,gumbel_r_gen.fit.<locals>.get_loc_from_scaleú  s1   ø€ Ø�6œRŸ\š\¨4¨%°%©-Ó8¼2¿6º6Ä#ÀdÃ)Ó;LÑLÑMÐMr8   c                 ó–   >• TT-
  [         R                  " TT-
  U -  5      -  T-   n[        T5      TU -   -  nUR                  5       U-
  $ rO   )rQ   rÒ   rí  rî  )r/   Úterm1Úterm2rF   r.   s      €€r6   rœ  Úgumbel_r_gen.fit.<locals>.func  sK   ø€ Ø  4™Z¬2¯6ª6°3¸±:ÀÑ2FÓ+GÑGÈ$ÑN�EÜ ›I¨¨u©Ñ5�EØ Ÿ9™9›;¨Ñ.Ð.r8   c                 óP   >• T* U -  n[        TUS9nTR                  5       U-
  U -
  $ )N)r“  )r•  r%  )r/   ÚsdataÚwavgrF   s      €r6   rœ  r¶    s0   ø€ Ø!˜E E™M�EÜ4°TÀeÑL�DØŸ9™9›;¨Ñ-°Ñ5Ð5r8   r/   r   rW   c                 óv   >• [         R                  " T" U 5      5      [         R                  " T" U5      5      :g  $ rO   rP   )rS   rT   rœ  s     €r6   rU   Ú0gumbel_r_gen.fit.<locals>.interval_contains_root"  s-   ø€ äŸš¡ V£Ó-ÜŸš¡ V£Ó-ñ.ð /r8   r   rp  )rn  Úrtolr™  )rp  r=   rQ   rm   r   r+   rq  )rE   rF   rG   r5   r  r  r±  r/   Úbrack_startrS   rT   rU   Úresrœ  r.   s    `           @@r6   rC   Úgumbel_r_gen.fití  s  ú€ ô 9¸¸tØ9=óEÑˆˆdõ	Nð Ñð ˆEÙ$ UÓ+ˆCð\ �EˆzÐðU ÑØ�÷/õ6ð Ÿ(™( 7¨AÓ.ˆKØ(¨1™_¨k¸A©o�Fõ
/ñ .¨f×=Ñ=Ø ›
 f¬r¯v©v£oØ˜!‘�Ø˜!‘�ñ .¨f×=Ñ=Ø �
 f¬r¯v©v¥oô ×&Ò& t°fÐ5EØ,1¸ñ?ˆCà—H‘HˆEØÑ*‘$Ñ0BÀ5Ó0IˆCØ�EˆzÐr8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r  r†   r€   rŠ   r   r  rL   r   r   rC   r“   r�   r8   r6   r—  r—  ±  s]   † ñò6ò'òò#òò#ò&ò&òPòð Ù˜MÓ*ñ@ó +ó ó@r8   r—  Úgumbel_rc                   óz   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS r\\" \5      S 5       5       rSrg)Úgumbel_l_geni5  aÉ  A left-skewed Gumbel continuous random variable.

%(before_notes)s

See Also
--------
gumbel_r, gompertz, genextreme

Notes
-----
The probability density function for `gumbel_l` is:

.. math::

    f(x) = \exp(x - e^x)

for real :math:`x`.

The Gumbel distribution is sometimes referred to as a type I Fisher-Tippett
distribution.  It is also related to the extreme value distribution,
log-Weibull and Gompertz distributions.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úgumbel_l_gen._shape_infoR  r¼   r8   c                 óL   • [         R                  " U R                  U5      5      $ rO   r<  r¿   s     r6   rw   Úgumbel_l_gen._pdfU  rœ  r8   c                 ó4   • U[         R                  " U5      -
  $ rO   rP  r¿   s     r6   rü   Úgumbel_l_gen._logpdfY  r  r8   c                 óZ   • [         R                  " [        R                  " U5      * 5      * $ rO   r$  r¿   s     r6   r{   Úgumbel_l_gen._cdf\  s   € Ü—’œ"Ÿ&š& ›)˜Ó$Ð$Ð$r8   c                 óZ   • [         R                  " [        R                  " U* 5      * 5      $ rO   ©rQ   r  r~   rï  rÉ   s     r6   r†   Úgumbel_l_gen._ppf_  s   € Ü�vŠv”r—x’x  “|�mÓ$Ð$r8   c                 ó0   • [         R                  " U5      * $ rO   rP  r¿   s     r6   r	  Úgumbel_l_gen._logsfb  ra  r8   c                 óX   • [         R                  " [         R                  " U5      * 5      $ rO   rP  r¿   s     r6   r€   Úgumbel_l_gen._sfe  ó   € Ü�vŠv”r—v’v˜a“y�jÓ!Ð!r8   c                 óX   • [         R                  " [         R                  " U5      * 5      $ rO   rg  r¿   s     r6   rŠ   Úgumbel_l_gen._isfh  rÒ  r8   c                 óÀ   • [         * [        R                  [        R                  -  S-  S[        R                  " S5      -  [        R                  S-  -  [        -  S4$ )Nrc  éôÿÿÿrË  rÌ  r„  r«  rn   s    r6   r   Úgumbel_l_gen._statsk  sF   € ÜˆwœŸ™œbŸe™e™ C™Ø”2—7’7˜1“:‰~œbŸe™e Q™hÑ&¬Ñ/°ð8ð 	8r8   c                 ó   • [         S-   $ r>  rÞ  rn   s    r6   r  Úgumbel_l_gen._entropyo  s   € Ü˜‰{Ðr8   c                 ó¤   • UR                  S5      b	  US   * US'   [        R                  " [        R                  " U5      * /UQ70 UD6u  pEU* U4$ )Nr  )r=   rÀ  rC   rQ   r"  )rE   rF   rG   r5   Úloc_rÚscale_rs         r6   rC   Úgumbel_l_gen.fitr  sT   € ð �8‰8�FÓÑ'Ø  ™L˜=ˆD�‰LÜ"Ÿ,š,¬¯
ª
°4Ó(8Ð'8ÐH¸4ÒHÀ4ÑH‰ˆØˆv�wˆÐr8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r	  r€   rŠ   r   r  rL   r   r   rC   r“   r�   r8   r6   rÂ  rÂ  5  sZ   † ñò8ò'òò%ò%òò"ò"ò8òð Ù˜MÓ*ñó +ó ór8   rÂ  Úgumbel_lc                   ó‚   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS r\\" \5      U 4S j5       5       rSrU =r$ )Úhalfcauchy_geni†  zãA Half-Cauchy continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `halfcauchy` is:

.. math::

    f(x) = \frac{2}{\pi (1 + x^2)}

for :math:`x \ge 0`.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úhalfcauchy_gen._shape_infoš  r¼   r8   c                 ó8   • S[         R                  -  SX-  -   -  $ r,  rc  r¿   s     r6   rw   Úhalfcauchy_gen._pdf�  s   € à”2—5‘5‰y˜#˜a™c™'Ñ"Ð"r8   c                 ó‚   • [         R                  " S[         R                  -  5      [        R                  " X-  5      -
  $ rv  ©rQ   r  r  r~   rï  r¿   s     r6   rü   Úhalfcauchy_gen._logpdf¡  s(   € Ü�vŠv�cœ"Ÿ%™%‘iÓ ¤2§8¢8¨A©C£=Ñ0Ð0r8   c                 óV   • S[         R                  -  [         R                  " U5      -  $ rv  rø  r¿   s     r6   r{   Úhalfcauchy_gen._cdf¤  s   € Ø”2—5‘5‰yœŸš 1›Ñ%Ð%r8   c                 óV   • [         R                  " [         R                  S-  U-  5      $ rD  ©rQ   Útanr  rÉ   s     r6   r†   Úhalfcauchy_gen._ppf§  s   € Ü�vŠv”b—e‘e˜A‘g˜a‘iÓ Ð r8   c                 óX   • S[         R                  -  [         R                  " SU5      -  $ ©NrÑ   r   )rQ   r  r   r¿   s     r6   r€   Úhalfcauchy_gen._sfª  s    € Ø”2—5‘5‰yœ2Ÿ:š: a¨Ó+Ñ+Ð+r8   c                 ó\   • S[         R                  " [         R                  U-  S-  5      -  $ r7  rë  r¸  s     r6   rŠ   Úhalfcauchy_gen._isf­  s"   € Ø”2—6’6œ"Ÿ%™% ™' !™)Ó$Ñ$Ð$r8   c                 ó~   • [         R                  [         R                  [         R                  [         R                  4$ rO   rE  rn   s    r6   r   Úhalfcauchy_gen._stats°  r/  r8   c                 óP   • [         R                  " S[         R                  -  5      $ rD  r  rn   s    r6   r  Úhalfcauchy_gen._entropy³  r2  r8   c                 ó  >• UR                  SS5      (       a  [        T
U ]  " U/UQ70 UD6$ [        XX#5      u  pn[        R
                  " U5      nUb!  Xd:  a  [        SU[        R                  S9eUnOUnS nUb  Un	Xy4$ U" Xq5      n	Xy4$ )Nrb  FÚ
halfcauchyrè  c                 óü   ^^• X-
  nUR                   m[        R                  " U5      mUU4S jn[        R                  " S5      R                  S-  n[        X4[        R                  " U5      4S9nUR                  $ )Nc                 óR   >• U S-  T-   nS[         R                  " TU-  5      -  T-
  $ rD  ©rQ   rî  )r/   Údenominatorre   Úshifted_data_squareds     €€r6   Úfun_to_solveÚ<halfcauchy_gen.fit.<locals>.find_scale.<locals>.fun_to_solveÐ  s1   ø€ Ø# Q™hÐ)=Ñ=�Øœ2Ÿ6š6Ð"6°{Ñ"BÓCÑCÀaÑGÐGr8   r•   r£   ©rn  )ró   rQ   ÚsquareÚfinfoÚtinyr+   rQ  rq  )r.   rF   Úshifted_datarþ  Úsmallr¾  re   rý  s         @@r6   Ú
find_scaleÚ&halfcauchy_gen.fit.<locals>.find_scaleË  sc   ù€ Ø™:ˆLØ—	‘	ˆAÜ#%§9¢9¨\Ó#:Ð öHô —H’H˜S“M×&Ñ&¨Ñ+ˆEÜ˜l¼B¿FºFÀ<Ó<PÐ4QÑRˆCØ—8‘8ˆOr8   ©r3   rA   rC   rp  rQ   rk  r‡  rm   )rE   rF   rG   r5   r  r  rl  r.   r  r/   rÞ  s             €r6   rC   Úhalfcauchy_gen.fit¶  s­   ø€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä8¸Ø9=óEÑˆ�Fô —6’6˜$“<ˆØÑØ‹ä" <°tÄ2Ç6Á6ÑJÐJØ‰Cð ˆCò	ð ÑØˆEð ˆzÐñ ˜sÓ)ˆEàˆzÐr8   r�   )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   rŠ   r   r  rL   r   r   rC   r“   r-  r.  s   @r6   rà  rà  †  sV   ø† ñò&ò#ò1ò&ò!ò,ò%ò.òð Ù˜MÓ*ô%ó +ó ö%r8   rà  rø  c                   ó‚   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS r\\" \5      U 4S j5       5       rSrU =r$ )Úhalflogistic_geniã  aÃ  A half-logistic continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `halflogistic` is:

.. math::

    f(x) = \frac{ 2 e^{-x} }{ (1+e^{-x})^2 }
         = \frac{1}{2} \text{sech}(x/2)^2

for :math:`x \ge 0`.

%(after_notes)s

References
----------
.. [1] Asgharzadeh et al (2011). "Comparisons of Methods of Estimation for the
       Half-Logistic Distribution". Selcuk J. Appl. Math. 93-108.

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úhalflogistic_gen._shape_infoý  r¼   r8   c                 óL   • [         R                  " U R                  U5      5      $ rO   r<  r¿   s     r6   rw   Úhalflogistic_gen._pdf   s   € ô �vŠv�d—l‘l 1“oÓ&Ð&r8   c                 ó’   • [         R                  " S5      U-
  S[        R                  " [         R                  " U* 5      5      -  -
  $ rÐ   )rQ   r  r~   rï  rÒ   r¿   s     r6   rü   Úhalflogistic_gen._logpdf  s1   € Ü�vŠv�a‹y˜1‰}˜r¤B§H¢H¬R¯VªV°Q°B«ZÓ$8Ñ8Ñ8Ð8r8   c                 ó4   • [         R                  " US-  5      $ rv  )rQ   Útanhr¿   s     r6   r{   Úhalflogistic_gen._cdf  s   € Ü�wŠw�q˜‘u‹~Ðr8   c                 ó4   • S[         R                  " U5      -  $ rD  ©rQ   ÚarctanhrÉ   s     r6   r†   Úhalflogistic_gen._ppf  s   € Ø”—’˜A“‰Ðr8   c                 ó6   • S[         R                  " U* 5      -  $ rD  ©r~   Úexpitr¿   s     r6   r€   Úhalflogistic_gen._sf  s   € Ø”2—8’8˜Q˜B“<ÑÐr8   c                 ó>   • [         R                  " US:  US S 5      $ )Nr£   c                 ó6   • [         R                  " SU -  5      * $ rÛ  ©r~   Úlogitrá   s    r6   r  Ú'halflogistic_gen._isf.<locals>.<lambda>  s   € ¬"¯(ª(°3¸±7Ó*;Ñ);r8   c                 ó:   • S[         R                  " SU -
  5      -  $ r  r  rá   s    r6   r  r!    s   € ¨¬2¯:ª:°a¸!±eÓ+<Ò)<r8   rK  rÉ   s     r6   rŠ   Úhalflogistic_gen._isf  s!   € Ü�Š˜q 3™w¨Ù;Ù<ó>ð 	>r8   c                 óŒ  • US:X  a  gUS:X  a  S[         R                  " S5      -  $ US:X  a$  [         R                  [         R                  -  S-  $ US:X  a	  S[        -  $ US:X  a  S[         R                  S-  -  S	-  $ SS[	        S
SU-
  5      -
  -  [
        R                  " US-   5      -  [
        R                  " US5      -  $ )Nr   r   rW   r·  rÌ  ry  rU  r  rÖ  rÑ   )rQ   r  r  r%   rÃ  r~   r6  r×  rd   s     r6   r+  Úhalflogistic_gen._munp  s©   € Ø�‹6ØØ�‹6Ø”R—V’V˜A“Y‘;ÐØ�‹6Ü—5‘5œŸ™‘;˜s‘?Ð"Ø�‹6Ø”V‘8ˆOØ�‹6Ø”R—U‘U˜A‘X‘: Ñ$Ð$Ø�!”C˜˜Q˜q™S“M‘/Ñ"¤2§8¢8¨A¨a©C£=Ñ0´·²¸¸A³Ñ>Ð>r8   c                 ó4   • S[         R                  " S5      -
  $ rD  rg  rn   s    r6   r  Úhalflogistic_gen._entropy#  ri  r8   c                 ó  >• UR                  SS5      (       a  [        T
U ]  " U/UQ70 UD6$ [        XX#5      u  pnS n[        R
                  " U5      nUb!  Xt:  a  [        SU[        R                  S9eUnOUnUb  UOU" X5      n	X‰4$ )Nrb  Fc                 ó¸  • U R                   S   n[        R                  " U SS9n[        R                  " SUS-   5      US-   -  nSU-
  nSU-   nUSU-  U-  [        R                  " Xe-  5      -  -
  nSU-  U-  nX1-
  nS[        R
                  " USS  USS  -  5      -  n	S[        R
                  " USS  USS  S-  -  5      -  n
U	[        R                  " U	S-  SU-  U
-  -   5      -   SU-  -  nSnSnUR                  5       nXÜ:”  aP  U[        R                  " U* U-  5      -  nUSU-  UR                  5       -  -
  n[        UU-
  U-  5      nUnXÜ:”  a  MP  U$ )	Nr   r]  r   r£   rW   rb  rU  rÅ  )rj  rQ   ÚsortrÁ  r  rî  r&  r%  r~   r  r  )rF   r.   Ún_observationsÚsorted_datarV  r…   Úpp1rK  r­  r  ÚCr/   r¼  Úrelative_residualÚshifted_meanÚsum_termÚ	scale_news                    r6   r  Ú(halflogistic_gen.fit.<locals>.find_scale/  sˆ  € ð "ŸZ™Z¨™]ˆNÜŸ'š' $¨QÑ/ˆKÜ—	’	˜!˜^¨aÑ/Ó0°.À1Ñ2DÑEˆAØ�A‘ˆAØ�a‘%ˆCØ˜˜a™ #™¬¯ª¨s©w«Ñ7Ñ7ˆEØ˜‘7˜S‘=ˆDØ%Ñ+ˆKØ”B—F’F˜5  ˜9 {°1°2 Ñ6Ó7Ñ7ˆAØ”B—F’F˜4  ˜8 k°!°" o°qÑ&8Ñ8Ó9Ñ9ˆAàœ"Ÿ'š' ! Q¡$¨¨^Ñ);¸aÑ)?Ñ"?Ó@Ñ@Ø˜.Ñ(ñ*ˆEð ˆDØ !ÐØ&×+Ñ+Ó-ˆLð $Ó*Ø&¬¯ª°;°,¸uÑ2DÓ)EÑE�Ø(¨1¨^Ñ+;¸h¿l¹l»nÑ+LÑL�	Ü$'¨°Ñ):¸EÑ(AÓ$BÐ!Ø!�ð	 $Õ*ð
 ˆLr8   Úhalflogisticrè  r  )rE   rF   rG   r5   r  r  r  rl  r.   r/   rÞ  s             €r6   rC   Úhalflogistic_gen.fit&  sž   ø€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä8¸Ø9=óEÑˆ�Fò	ôD —6’6˜$“<ˆØÑØ‹ä" >¸ÄRÇVÁVÑLÐLØ‰Cð ˆCð !Ñ,‘±*¸TÓ2GˆàˆzÐr8   r�   )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   rŠ   r+  r  rL   r   r   rC   r“   r-  r.  s   @r6   r  r  ã  sV   ø† ñò2ò'ò
9òòò ò>ò
?òð Ù˜MÓ*ô6ó +ó ö6r8   r  r4  c                   óŒ   ^ • \ rS rSrSrS rSS jrS rS rS r	S r
S	 rS
 rS rS r\\" \5      U 4S j5       5       rSrU =r$ )Úhalfnorm_genid  a  A half-normal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `halfnorm` is:

.. math::

    f(x) = \sqrt{2/\pi} \exp(-x^2 / 2)

for :math:`x >= 0`.

`halfnorm` is a special case of `chi` with ``df=1``.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úhalfnorm_gen._shape_infoz  r¼   r8   c                 ó2   • [        UR                  US95      $ rù  r5  rò   s      r6   rõ   Úhalfnorm_gen._rvs}  s   € Ü�<×/Ñ/°TÐ/Ð:Ó;Ð;r8   c                 óŒ   • [         R                  " S[         R                  -  5      [         R                  " U* U-  S-  5      -  $ rv  ©rQ   r&  r  rÒ   r¿   s     r6   rw   Úhalfnorm_gen._pdf€  s1   € ä�wŠw�sœ2Ÿ5™5‘yÓ!¤"§&¢&¨!¨¨A©¨c©Ó"2Ñ2Ð2r8   c                 óf   • S[         R                  " S[         R                  -  5      -  X-  S-  -
  $ ©Nr£   rÑ   r  r¿   s     r6   rü   Úhalfnorm_gen._logpdf„  s)   € Ø”R—V’V˜C¤§¡™IÓ&Ñ&¨©¨S©Ñ0Ð0r8   c                 ó\   • [         R                  " U[        R                  " S5      -  5      $ rD  ©r~   r:  rQ   r&  r¿   s     r6   r{   Úhalfnorm_gen._cdf‡  s   € Ü�vŠv�aœ"Ÿ'š' !›*‘nÓ%Ð%r8   c                 ó$   • [        SU-   S-  5      $ r€  rê   rÉ   s     r6   r†   Úhalfnorm_gen._ppfŠ  s   € Ü˜!˜A™#˜s™Ó#Ð#r8   c                 ó   • S[        U5      -  $ rD  r  r¿   s     r6   r€   Úhalfnorm_gen._sf�  s   € Ø”8˜A“;‰Ðr8   c                 ó   • [        US-  5      $ rD  r  r¸  s     r6   rŠ   Úhalfnorm_gen._isf�  s   € Ü˜˜1™‹~Ðr8   c                 óT  • [         R                  " S[         R                  -  5      SS[         R                  -  -
  [         R                  " S5      S[         R                  -
  -  [         R                  S-
  S-  -  S[         R                  S-
  -  [         R                  S-
  S-  -  4$ )NrÑ   r   rW   rU  rg  rb  rÌ  ©rQ   r&  r  rn   s    r6   r   Úhalfnorm_gen._stats“  sx   € Ü—’˜œBŸE™E™	Ó"Ø�#”b—e‘e‘)‘Ü—’˜“
˜AœbŸe™e™GÑ$¤b§e¡e¨A¡g°¡^Ñ3Ø”2—5‘5˜‘7‘œRŸU™U 1™W q™LÑ(ð*ð 	*r8   c                 ó\   • S[         R                  " [         R                  S-  5      -  S-   $ r@  r  rn   s    r6   r  Úhalfnorm_gen._entropy™  s#   € Ø”2—6’6œ"Ÿ%™% ™)Ó$Ñ$ SÑ(Ð(r8   c                 ó8  >• UR                  SS5      (       a  [        T	U ]  " U/UQ70 UD6$ [        XX#5      u  pn[        R
                  " U5      nUb!  Xd:  a  [        SU[        R                  S9eUnOUnUb  UnXx4$ [        R                  " USUS9S-  nXx4$ )Nrb  FÚhalfnormrè  rW   )ÚorderÚcenterr£   )
r3   rA   rC   rp  rQ   rk  r‡  rm   rT  Úmoment)
rE   rF   rG   r5   r  r  rl  r.   r/   rÞ  s
            €r6   rC   Úhalfnorm_gen.fitœ  s±   ø€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä8¸Ø9=óEÑˆ�Fô —6’6˜$“<ˆàÑØ‹ä" :°TÄÇÁÑHÐHØ‰CàˆCàÑØˆEð ˆzÐô —L’L ¨Q°sÑ;¸SÑ@ˆEàˆzÐr8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r†   r€   rŠ   r   r  rL   r   r   rC   r“   r-  r.  s   @r6   r7  r7  d  s[   ø† ñò*ô<ò3ò1ò&ò$òòò*ò)ð Ù˜MÓ*ôó +ó ör8   r7  rQ  c                   óH   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rSrg)Úhypsecant_geniº  zõA hyperbolic secant continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `hypsecant` is:

.. math::

    f(x) = \frac{1}{\pi} \text{sech}(x)

for a real number :math:`x`.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úhypsecant_gen._shape_infoÎ  r¼   r8   c                 óV   • S[         R                  [         R                  " U5      -  -  $ r>  )rQ   r  Úcoshr¿   s     r6   rw   Úhypsecant_gen._pdfÑ  s   € à”B—E‘Eœ"Ÿ'š' !›*Ñ$Ñ%Ð%r8   c                 ó~   • S[         R                  -  [         R                  " [         R                  " U5      5      -  $ rv  ©rQ   r  rù  rÒ   r¿   s     r6   r{   Úhypsecant_gen._cdfÕ  s&   € Ø”2—5‘5‰yœŸš¤2§6¢6¨!£9Ó-Ñ-Ð-r8   c                 ó~   • [         R                  " [         R                  " [         R                  U-  S-  5      5      $ rv  ©rQ   r  rì  r  rÉ   s     r6   r†   Úhypsecant_gen._ppfØ  s&   € Ü�vŠv”b—f’fœRŸU™U 1™W S™[Ó)Ó*Ð*r8   c                 ó€   • S[         R                  -  [         R                  " [         R                  " U* 5      5      -  $ rv  r^  r¿   s     r6   r€   Úhypsecant_gen._sfÛ  s(   € Ø”2—5‘5‰yœŸš¤2§6¢6¨1¨"£:Ó.Ñ.Ð.r8   c                 ó€   • [         R                  " [         R                  " [         R                  U-  S-  5      5      * $ rv  ra  rÉ   s     r6   rŠ   Úhypsecant_gen._isfÞ  s)   € Ü—’”r—v’vœbŸe™e A™g c™kÓ*Ó+Ð+Ð+r8   c                 óR   • S[         R                  [         R                  -  S-  SS4$ )Nr   rU  rW   rc  rn   s    r6   r   Úhypsecant_gen._statsá  s!   € Ø”"—%‘%œŸ™‘+˜a‘-  AÐ%Ð%r8   c                 óP   • [         R                  " S[         R                  -  5      $ rD  r  rn   s    r6   r  Úhypsecant_gen._entropyä  r2  r8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   r{   r†   r€   rŠ   r   r  r“   r�   r8   r6   rW  rW  º  s/   † ñò&ò&ò.ò+ò/ò,ò&õr8   rW  Ú	hypsecantc                   ó0   • \ rS rSrSrS rS rS rS rSr	g)	Úgausshyper_genië  a  A Gauss hypergeometric continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `gausshyper` is:

.. math::

    f(x, a, b, c, z) = C x^{a-1} (1-x)^{b-1} (1+zx)^{-c}

for :math:`0 \le x \le 1`, :math:`a,b > 0`, :math:`c` a real number,
:math:`z > -1`, and :math:`C = \frac{1}{B(a, b) F[2, 1](c, a; a+b; -z)}`.
:math:`F[2, 1]` is the Gauss hypergeometric function
`scipy.special.hyp2f1`.

`gausshyper` takes :math:`a`, :math:`b`, :math:`c` and :math:`z` as shape
parameters.

%(after_notes)s

References
----------
.. [1] Armero, C., and M. J. Bayarri. "Prior Assessments for Prediction in
       Queues." *Journal of the Royal Statistical Society*. Series D (The
       Statistician) 43, no. 1 (1994): 139-53. doi:10.2307/2348939

%(example)s

c                 ó.   • US:„  US:„  -  X3:H  -  US:„  -  $ )Nr   r  r�   )rE   r—   r˜   rj  rë  s        r6   rf   Úgausshyper_gen._argcheck  s%   € à�A‘˜!˜a™%Ñ  A¡FÑ+¨q°2©vÑ6Ð6r8   c                 ó  • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      n[        SS[        R                  * [        R                  4S5      n[        SSS[        R                  4S5      nXX4/$ )	Nr—   Fr   r3  r˜   rj  rë  r  rl   )rE   r§  r¨  rŠ  Úizs        r6   ro   Úgausshyper_gen._shape_info  st   € Ü˜˜U Q¬¯© K°Ó@ˆÜ˜˜U Q¬¯© K°Ó@ˆÜ˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆÜ˜˜U R¬¯© L°.ÓAˆØ˜ÐÐr8   c                 ó®   • [         R                  " X#5      [         R                  " XBX#-   U* 5      -  nSU-  XS-
  -  -  SU-
  US-
  -  -  SXQ-  -   U-  -  $ r>  ©r~   r­  Úhyp2f1)rE   rv   r—   r˜   rj  rë  Únormalization_constants          r6   rw   Úgausshyper_gen._pdf  sc   € Ü!#§¢¨£´·²¸1ÀÁÈÈÓ1KÑ!KÐØÐ)Ñ)¨A°B±©KÑ7¸2À¹6ÀQÈÁWÑ:MÑMØ˜™‘9˜q‘.ñ!ð 	"r8   c                 óè   • [         R                  " X-   U5      [         R                  " X#5      -  n[         R                  " XBU-   X#-   U-   U* 5      n[         R                  " XBX#-   U* 5      nXg-  U-  $ rO   rt  )	rE   re   r—   r˜   rj  rë  rô  rg  rä  s	            r6   r+  Úgausshyper_gen._munp  s`   € Ü�gŠg�a‘c˜1‹o¤§¢¨£Ñ-ˆÜ�iŠi˜˜Q™3 ¡ A¡¨ rÓ*ˆÜ�iŠi˜˜a™c A 2Ó&ˆØ‰w˜‰}Ðr8   r�   N)
rŽ   r�   r�   r‘   r’   rf   ro   rw   r+  r“   r�   r8   r6   rm  rm  ë  s   † ñò@7ò ò"õ
r8   rm  Ú
gausshyperc                   ój   • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	 rSS
 jrS rSrg)Úinvgamma_geni&  a  An inverted gamma continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `invgamma` is:

.. math::

    f(x, a) = \frac{x^{-a-1}}{\Gamma(a)} \exp(-\frac{1}{x})

for :math:`x >= 0`, :math:`a > 0`. :math:`\Gamma` is the gamma function
(`scipy.special.gamma`).

`invgamma` takes ``a`` as a shape parameter for :math:`a`.

`invgamma` is a special case of `gengamma` with ``c=-1``, and it is a
different parameterization of the scaled inverse chi-squared distribution.
Specifically, if the scaled inverse chi-squared distribution is
parameterized with degrees of freedom :math:`\nu` and scaling parameter
:math:`\tau^2`, then it can be modeled using `invgamma` with
``a=`` :math:`\nu/2` and ``scale=`` :math:`\nu \tau^2/2`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r2  rl   rn   s    r6   ro   Úinvgamma_gen._shape_infoF  r5  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  r8  s      r6   rw   Úinvgamma_gen._pdfI  r³  r8   c                 óv   • US-   * [         R                  " U5      -  [        R                  " U5      -
  SU-  -
  $ rµ  ©rQ   r  r~   r  r8  s      r6   rü   Úinvgamma_gen._logpdfM  s1   € Ø�1‘ˆvœŸš˜q›	Ñ!¤B§J¢J¨q£MÑ1°C¸±EÑ9Ð9r8   c                 ó6   • [         R                  " USU-  5      $ r>  rY  r8  s      r6   r{   Úinvgamma_gen._cdfP  s   € Ü�|Š|˜A˜s Q™wÓ'Ð'r8   c                 ó4   • S[         R                  " X!5      -  $ r>  r³  rA  s      r6   r†   Úinvgamma_gen._ppfS  s   € Ø”R—_’_ QÓ*Ñ*Ð*r8   c                 ó6   • [         R                  " USU-  5      $ r>  rU  r8  s      r6   r€   Úinvgamma_gen._sfV  s   € Ü�{Š{˜1˜c A™gÓ&Ð&r8   c                 ó4   • S[         R                  " X!5      -  $ r>  r“  rA  s      r6   rŠ   Úinvgamma_gen._isfY  s   € Ø”R—^’^ AÓ)Ñ)Ð)r8   c                 ór  • [         R                  " US:„  US [        R                  S9n[         R                  " US:„  US [        R                  S9nSu  pVSU;   a)  [         R                  " US:„  US	 [        R                  S9nS
U;   a)  [         R                  " US:„  US [        R                  S9nX4XV4$ )Nr   c                 ó   • SU S-
  -  $ r>  r�   rÔ   s    r6   r  Ú%invgamma_gen._stats.<locals>.<lambda>^  s   €  r¨Q°©V¢}r8   r  rW   c                 ó$   • SU S-
  S-  -  U S-
  -  $ )Nr•   rW   rÑ   r�   rÔ   s    r6   r  rŽ  a  s   €  r¨Q°©V°a©KÑ'7¸1¸r¹6Ò'Br8   r-  rx  rÌ  c                 óF   • S[         R                  " U S-
  5      -  U S-
  -  $ )Nr¾  rÑ   r·  rÍ  rÔ   s    r6   r  rŽ  g  s   € ¨2´·²¸¸B¹³Ñ+?À1ÀrÁ6Ò+Jr8   rz  rU  c                 ó0   • SSU -  S-
  -  U S-
  -  U S-
  -  $ )Nrc  r¾  g      &@r·  r¾  r�   rÔ   s    r6   r  rŽ  k  s$   € ¨2°°a±¸#±Ñ+>À!ÀbÁ&Ñ+IÈQÐQSÉVÒ+Tr8   r  )rE   r—   r}  rÌ  rÍ  r  r€  s          r6   r   Úinvgamma_gen._stats\  s©   € Ü�_Š_˜Q ™U AÙ4Ü(*¯©ñ0ˆô �_Š_˜Q ™U AÙBÜ(*¯©ñ0ˆð ‰ˆØ�'‹>Ü—’  Q¡¨Ù!JÜ,.¯F©Fñ4ˆBð �'‹>Ü—’  Q¡¨Ù!TÜ,.¯F©Fñ4ˆBð �rˆ~Ðr8   c                 óH   • S nS n[         R                  " US:¬  XU5      nU$ )Nc                 óp   • X S-   [         R                  " U 5      -  -
  [         R                  " U 5      -   nU$ r>  r½  ©r—   rž  s     r6   rù  Ú&invgamma_gen._entropy.<locals>.regularq  s-   € Ø˜‘W¤§¢ q£	Ñ)Ñ)¬B¯JªJ°q«MÑ9ˆAØˆHr8   c                 ó  • SS[         R                  " U 5      -  -
  [         R                  " S5      -   [         R                  " [         R                  5      -   S-  SU S-  -  -   U S-  S-  -   U S-  S	-  -
  U S
-  S-  -
  nU$ )Nr   rÌ  rW   çUUUUUUå?r­  rþ  r  rÿ  r½  r   r  r  r•  s     r6   r  Ú)invgamma_gen._entropy.<locals>.asymptoticu  s‚   € ð �aœŸš˜q›	‘k‘/¤B§F¢F¨1£IÑ-´·²´r·u±u³Ñ=¸qÑ@Ø�q˜#‘v‘:ñØ ! 3¡ r¡	ñ*Ø,-¨s©F°2©Iñ6Ø89¸3¹¸s¹
ñCˆAàˆHr8   r  rK  )rE   r—   rù  r  rž  s        r6   r  Úinvgamma_gen._entropyp  s)   € ò	ò	ô �OŠO˜A ™H a°WÓ=ˆØˆr8   r�   N©Úmvsk)rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rw   rü   r{   r†   r€   rŠ   r   r  r“   r�   r8   r6   r|  r|  &  sB   † ñð: "×4Ñ4€MòEò*ò:ò(ò+ò'ò*ôõ(r8   r|  Úinvgammac                   ó²   ^ • \ rS rSrSr\R                  rS rSS jr	S r
S rS rS rS	 rS
 rU 4S jrU 4S jrS r\" \5      U 4S j5       rS rSrU =r$ )Úinvgauss_geniƒ  añ  An inverse Gaussian continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `invgauss` is:

.. math::

    f(x; \mu) = \frac{1}{\sqrt{2 \pi x^3}}
                \exp\left(-\frac{(x-\mu)^2}{2 \mu^2 x}\right)

for :math:`x \ge 0` and :math:`\mu > 0`.

`invgauss` takes ``mu`` as a shape parameter for :math:`\mu`.

%(after_notes)s

A common shape-scale parameterization of the inverse Gaussian distribution
has density

.. math::

    f(x; \nu, \lambda) = \sqrt{\frac{\lambda}{2 \pi x^3}}
                \exp\left( -\frac{\lambda(x-\nu)^2}{2 \nu^2 x}\right)

Using ``nu`` for :math:`\nu` and ``lam`` for :math:`\lambda`, this
parameterization is equivalent to the one above with ``mu = nu/lam``,
``loc = 0``, and ``scale = lam``.

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

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

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ©Nr}  Fr   r3  rl   rn   s    r6   ro   Úinvgauss_gen._shape_info¯  rH  r8   c                 ó$   • UR                  USUS9$ ©Nr•   rÊ  ©Úwald©rE   r}  ró   rô   s       r6   rõ   Úinvgauss_gen._rvs²  s   € Ø× Ñ   S¨tÐ Ð4Ð4r8   c                 ó²   • S[         R                  " S[         R                  -  US-  -  5      -  [         R                  " SSU-  -  X-  S-
  S-  -  5      -  $ )Nr•   rW   r·  r­  r   r=  ©rE   rv   r}  s      r6   rw   Úinvgauss_gen._pdfµ  sM   € ð ”2—7’7˜1œRŸU™U™7 1 c¡6™>Ó*Ñ*¬2¯6ª6°$¸¸!¹±*¸a¹dÀQ¹hÈ¹]Ñ2JÓ+KÑKÐKr8   c                 ó¬   • S[         R                  " S[         R                  -  5      -  S[         R                  " U5      -  -
  X-  S-
  S-  SU-  -  -
  $ )Nr@  rW   rg  r   r  rª  s      r6   rü   Úinvgauss_gen._logpdfº  sF   € Ø”B—F’F˜1œRŸU™U™7“OÑ# c¬"¯&ª&°«)¡mÑ3°q±t¸a±xÀ!±mÀQÀqÁSÑ6IÑIÐIr8   c                 óì   • S[         R                  " U5      -  n[        X1U-  S-
  -  5      nSU-  [        U* X-  S-   -  5      -   nU[         R                  " [         R                  " XT-
  5      5      -   $ rf  )rQ   r&  rÞ   rï  rÒ   ©rE   rv   r}  rô  r—   r˜   s         r6   r  Úinvgauss_gen._logcdfÁ  sf   € Ø”"—'’'˜!“*‰nˆÜ˜ "¡ q¡Ñ)Ó*ˆØ�‰F”\ 3 $¨!©$°©(Ñ"3Ó4Ñ4ˆØ”2—8’8œBŸFšF 1¡5›MÓ*Ñ*Ð*r8   c                 óî   • S[         R                  " U5      -  n[        X1U-  S-
  -  5      nSU-  [        U* X-  S-   -  5      -   nU[         R                  " [         R
                  " XT-
  5      * 5      -   $ rf  )rQ   r&  rè   rÞ   rï  rÒ   r¯  s         r6   r	  Úinvgauss_gen._logsfÇ  sh   € Ø”"—'’'˜!“*‰nˆÜ˜ ™t a™xÑ(Ó)ˆØ�‰F”\ 3 $¨!©$°©(Ñ"3Ó4Ñ4ˆØ”2—8’8œRŸVšV A¡E›]˜NÓ+Ñ+Ð+r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r¥  rª  s      r6   r€   Úinvgauss_gen._sfÍ  s   € Ü�vŠv�d—k‘k !Ó(Ó)Ð)r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r  rª  s      r6   r{   Úinvgauss_gen._cdfÐ  ó   € Ü�vŠv�d—l‘l 1Ó)Ó*Ð*r8   c                 ó”  >• [         R                  " SSSS9   [         R                  " X5      u  p[         R                  " [        R
                  " XS5      5      nUS:„  n[        R                  " SX   -
  X$   S5      X4'   [         R                  " U5      n[        TU ]%  X   X%   5      X5'   S S S 5        U$ ! , (       d  f       W$ = f©Nrp  )rr  r²  r  r   r£   )
rQ   rs  rS  r"  rs   Ú_invgauss_ppfÚ_invgauss_isfrP  rA   r†   )rE   rv   r}  ÚppfÚi_wtÚi_nanrÞ  s         €r6   r†   Úinvgauss_gen._ppfÓ  s¨   ø€ Ü�[Š[ ¨xÀÓJÜ×'Ò'¨Ó.‰EˆAÜ—*’*œS×.Ò.¨q°aÓ8Ó9ˆCØ�s‘7ˆDÜ×)Ò)¨!¨A©G©)°R±X¸qÓAˆC‰IÜ—H’H˜S“MˆEÜ™™ a¡h°±	Ó:ˆC‰J÷ Kð ˆ
÷ KÔJð ˆ
ús   ˜BB8Â8
Cc                 ól  >• [         R                  " SSSS9   [         R                  " X5      u  p[        R                  " XS5      nUS:„  n[        R
                  " SX   -
  X$   S5      X4'   [         R                  " U5      n[        TU ]!  X   X%   5      X5'   S S S 5        U$ ! , (       d  f       W$ = fr¹  )	rQ   rs  rS  rs   r»  rº  rP  rA   rŠ   )rE   rv   r}  Úisfr½  r¾  rÞ  s         €r6   rŠ   Úinvgauss_gen._isfÝ  sŸ   ø€ Ü�[Š[ ¨xÀÓJÜ×'Ò'¨Ó.‰EˆAÜ×#Ò# A¨1Ó-ˆCØ�s‘7ˆDÜ×)Ò)¨!¨A©G©)°R±X¸qÓAˆC‰IÜ—H’H˜S“MˆEÜ™™ a¡h°±	Ó:ˆC‰J÷ Kð ˆ
÷ KÔJð ˆ
ús   ˜BB$Â$
B3c                 óF   • XS-  S[         R                  " U5      -  SU-  4$ )Nr·  rÌ  ru  rÍ  )rE   r}  s     r6   r   Úinvgauss_gen._statsç  s#   € Ø�s‘7˜AœbŸgšg b›k™M¨2¨b©5Ð0Ð0r8   c                 ó2  >• UR                  SS5      n[        U[        5      (       d)  [        U [        5      (       d  UR	                  5       S:X  a  [
        T	U ]  " U/UQ70 UD6$ [        XX#5      u  ppg Ub  Ub  [
        T	U ]  " U/UQ70 UD6$ [        R                  " X-
  S:  5      (       a  [        SS[        R                  S9eX-
  n[        R                  " U5      nUc+  [        U5      [        R                  " US-  US-  -
  5      -  nX‡-  nXVU4$ )Nr1   r;   r<   r   Úinvgaussrè  r  )r=   r?   r*   Úwald_genr>   rA   rC   rp  rQ   rì  r‡  rm   r%  rí  rî  )
rE   rF   rG   r5   r1   Úfshape_sr  r  Úfshape_nrÞ  s
            €r6   rC   Úinvgauss_gen.fitê  s
  ø€ à—‘˜( EÓ*ˆä�tœ\×*Ñ*¬j¸¼x×.HÑ.HØ—<‘<“> TÓ)Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä'BÀ4ØCGó(OÑ$ˆ˜ð	ð ‰<˜8Ñ/Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3Ü�VŠV�D‘K !‘O×$Ñ$Ü˜z°¼"¿&¹&ÑAÐAà‘;ˆDÜ—w’w˜t“}ˆHØ‰~Ü˜T›¤b§f¢f¨T°R©Z¸(Àb¹.Ñ-HÓ&IÑJ�ØÑ(ˆHØ˜vÐ%Ð%r8   c                 óî   • S[         R                  " S[         R                  -  5      -   S[         R                  " U5      -  -   nSU-  n[        R                  R                  U5      U-  nSU-  SU-  -
  $ )zF
Ref.: https://moser-isi.ethz.ch/docs/papers/smos-2012-10.pdf (eq. 9)
r•   rW   rÌ  r£   rg  )rQ   r  r  r~   r‹  rŒ  )rE   r}  r—   rW  r˜   s        r6   r  Úinvgauss_gen._entropy  sg   € ð ”—’˜œBŸE™E™	Ó"Ñ" Q¬¯ª°«¡^Ñ3ˆð ˆb‰DˆÜ�J‰J×#Ñ# AÓ& qÑ(ˆØ�Q‰w˜˜q™Ñ Ð r8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rõ   rw   rü   r  r	  r€   r{   r†   rŠ   r   r   rC   r  r“   r-  r.  s   @r6   rŸ  rŸ  ƒ  st   ø† ñ(ðR "×4Ñ4€MòFô5òLò
Jò+ò,ò*ò+õõò1ñ ˜MÓ*ô&ó +ð&÷B!ð !r8   rŸ  rÆ  c                   óX   • \ rS rSrSrS rS rS rS rS r	S r
SS
 jrS rS rS rSrg	)Úgeninvgauss_geni  a  A Generalized Inverse Gaussian continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `geninvgauss` is:

.. math::

    f(x, p, b) = x^{p-1} \exp(-b (x + 1/x) / 2) / (2 K_p(b))

where ``x > 0``, `p` is a real number and ``b > 0``\([1]_).
:math:`K_p` is the modified Bessel function of second kind of order `p`
(`scipy.special.kv`).

%(after_notes)s

The inverse Gaussian distribution `stats.invgauss(mu)` is a special case of
`geninvgauss` with ``p = -1/2``, ``b = 1 / mu`` and ``scale = mu``.

Generating random variates is challenging for this distribution. The
implementation is based on [2]_.

References
----------
.. [1] O. Barndorff-Nielsen, P. Blaesild, C. Halgreen, "First hitting time
   models for the generalized inverse gaussian distribution",
   Stochastic Processes and their Applications 7, pp. 49--54, 1978.

.. [2] W. Hoermann and J. Leydold, "Generating generalized inverse Gaussian
   random variates", Statistics and Computing, 24(4), p. 547--557, 2014.

%(example)s

c                 ó   • X:H  US:„  -  $ rö  r�   ©rE   rV  r˜   s      r6   rf   Úgeninvgauss_gen._argcheckB  s   € Ø‘˜1˜q™5Ñ!Ð!r8   c                 óž   • [        SS[        R                  * [        R                  4S5      n[        SSS[        R                  4S5      nX/$ )NrV  Fr3  r˜   r   rl   )rE   r,  r¨  s      r6   ro   Úgeninvgauss_gen._shape_infoE  ó@   € Ü˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆÜ˜˜U Q¬¯© K°Ó@ˆØˆxˆr8   c                 óð   • S n[         R                  " U[         R                  /S9nU" XU5      n[         R                  " U5      R	                  5       (       a  Sn[
        R                  " U[        SS9  U$ )Nc                 ó0   • [         R                  " XU5      $ rO   )r   Úgeninvgauss_logpdf©rv   rV  r˜   s      r6   Úlogpdf_singleÚ.geninvgauss_gen._logpdf.<locals>.logpdf_singleN  s   € Ü×,Ò,¨Q°1Ó5Ð5r8   r@  zjInfinite values encountered in scipy.special.kve(p, b). Values replaced by NaN to avoid incorrect results.rÌ  rÕ  )rQ   r7  rC  rP  rì  r×  rØ  rÙ  )rE   rv   rV  r˜   rÙ  rë  r[   s          r6   rü   Úgeninvgauss_gen._logpdfJ  s]   € ò	6ô Ÿš ]¼B¿J¹J¸<ÑHˆá˜! Ó"ˆÜ�8Š8�A‹;�?‰?×ÑðHˆCä�MŠM˜#œ~¸!Ò<Øˆr8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  ©rE   rv   rV  r˜   s       r6   rw   Úgeninvgauss_gen._pdfZ  r>  r8   c                 ó’   ^• U R                  X#5      u  mnU4S jn[        R                  " U[        R                  /S9nU" XU5      $ )Nc                 óø   >• [         R                  " X/[        5      R                  R	                  [        R
                  5      n[        R                  " [        SU5      n[        R                  " UTU 5      S   $ )NÚ_geninvgauss_pdfr   )rQ   rI  r  rJ  rK  rL  r   rM  r   r   rO  )rv   rV  r˜   rR  rS  rA  s        €r6   Ú_cdf_singleÚ)geninvgauss_gen._cdf.<locals>._cdf_singlea  s\   ø€ ÜŸš ! ¬Ó/×6Ñ6×>Ñ>¼v¿¹ÓOˆIÜ"×.Ò.¬vÐ7IØ/8ó:ˆCô —>’> # r¨1Ó-¨aÑ0Ð0r8   r@  )r¥   rQ   r7  rC  )rE   rv   rV  r˜   r@  râ  rA  s         @r6   r{   Úgeninvgauss_gen._cdf^  sA   ø€ Ø×"Ñ" 1Ó(‰ˆˆBõ	1ô —l’l ;¼¿
¹
°|ÑDˆá˜1 Ó#Ð#r8   c                 óZ   • [         R                  " US:„  XU4S [        R                  * S9$ )Nr   c                 óV   • US-
  [         R                  " U 5      -  X SU -  -   -  S-  -
  $ rf  rg  rØ  s      r6   r  Ú.geninvgauss_gen._logquasipdf.<locals>.<lambda>o  s(   € °°A±´r·v²v¸a³yÑ/@À1È!ÈAÉ#ÁgÁ;ÈqÁ=Ò/Pr8   r  rc  rÝ  s       r6   Ú_logquasipdfÚgeninvgauss_gen._logquasipdfl  s+   € ä�Š˜q 1™u q¨Q iÙPÜ+-¯6©6¨'ñ3ð 	3r8   Nc                 ó‚  ^	^
• [         R                  " U5      (       a/  [         R                  " U5      (       a  U R                  XX45      nGO\UR                  S:X  aA  UR                  S:X  a1  U R                  UR	                  5       UR	                  5       X45      nGO[         R
                  " X5      u  p[        UR                  U5      u  nm	[        [         R                  " U5      5      n[         R                  " U5      n[         R                  " X/S/S/S//S9m
T
R                  (       dx  [        U	U
4S j[        [        U5      * S5       5       5      nU R                  T
S   T
S   UU5      R!                  U5      XX'   T
R#                  5         T
R                  (       d  Mx  US:X  a  UR	                  5       nU$ )Nr   Úmulti_indexÚreadonly©ÚflagsÚop_flagsc              3   ól   >#   • U  H)  nTU   (       d  TR                   U   O
[        S 5      v •  M+     g 7frO   ©rë  Úslice©re  r&  ÚbcÚits     €€r6   rg  Ú'geninvgauss_gen._rvs.<locals>.<genexpr>Ÿ  ó0   øé € ð ;Ú%9 ð 79¸·e˜RŸ^™^¨AÒ.ÄÀtÃÔLÚ%9ùó   ƒ14r   r�   )rQ   rU  Ú_rvs_scalarró   rÄ  rS  r   rj  r*  r_  ÚemptyÚnditerÚfinishedÚtupler`  rí  rÂ  Úiternext)rE   rV  r˜   ró   rô   rX  ÚshpÚ
numsamplesÚidxrô  rõ  s            @@r6   rõ   Úgeninvgauss_gen._rvsr  sa  ù€ ô �;Š;�q�>‰>œbŸkšk¨!Ÿn™nØ×"Ñ" 1¨Ó<ŠCØ�V‰V�q‹[˜QŸV™V q›[Ø×"Ñ" 1§6¡6£8¨Q¯V©V«X°tÓJŠCô ×&Ò& qÓ,‰DˆAô # 1§7¡7¨DÓ1‰GˆC�ô œRŸWšW S›\Ó*ˆJô —(’(˜4“.ˆCä—’˜A˜6Ø"/ Ø&0 \°J°<Ð$@ñBˆBð —k—kô õ ;Ü%*¬C°«I¨:°qÔ%9ó;ó ;�à×+Ñ+¨B¨q©E°2°a±5¸*Ø,8ó:ß:A¹'À#»,ð ‘à—‘”ð —k—k‘kð  �2‹:Ø—(‘(“*ˆCØˆ
r8   c           	      ó6  ^ ^^^3• SnU(       d  SnTS:  a  T* mSnT R                  TT5      nSnTS:¼  d  TS:”  a  SnO2T[        SS[        R                  " ST-
  5      -  S-  5      :¼  a  SnOSn[	        [        R
                  " U5      5      n	[        R                  " U	5      n
[        R                  " U
5      nSnU(       Gaì  W(       Gaw  STS-   -  T-  U-
  nSU-  TS-
  -  T-  S-
  nXíS-  S-  -
  nSUS-  -  S	-  XÞ-  S-  -
  U-   n[        R                  " U* [        R                  " S
US-  -  5      -  S-  5      n[        R                  " SU-  S-  5      * nU[        R                  " US-  [        R                  S-  -   5      -  US-  -
  nU* [        R                  " US-  5      -  US-  -
  nT R                  UTT5      m3T R                  UTT5      T3-
  nT R                  UTT5      T3-
  nUU-
  [        R                  " SU-  5      -  nUU-
  [        R                  " SU-  5      -  nSnUU3UU 4S jnUnOŽ[        R                  " ST R                  UTT5      -  5      nST-   [        R                  " ST-   S-  TS-  -   5      -   T-  nSnU[        R                  " ST R                  UTT5      -  5      -  nSnUUU 4S jnUU:¼  a  [        S5      eUS::  a  [        S5      eSnXÊ:  a´  X¬-
  nUUR                  US9-  nUR                  US9n UUU-
  U -  -   n U U-  U-   n!S[        R                  " U5      -  U" U!5      :*  n"[        R                   " U"5      n#U#S:”  a  U!U"   X¼UU#-   & UU#-  nUS:X  a  UU
-  S:¼  a  SUU
-   S3n$[#        U$5      eUS-  nXÊ:  a  M´  GOÆTST-
  -  n%[        R$                  " U%ST-  45      n&[        R                  " T R                  UTT5      5      n'U'U%-  n(U%ST-  :  aR  [        R                  " T* 5      n)TS:”  a  U)ST-  T-  U%T-  -
  -  T-  n*O%U)[        R                  " STS-  -  5      -  n*OSu  n)n*U&TS-
  -  n+SU+-  [        R                  " U&* T-  S-  5      -  T-  n,U(U*-   U,-   n-XÊ:  GaÛ  X¬-
  n[        R                  " U5      [        R                  " U5      n!n.UR                  US9nU-UR                  US9-  n U U(:*  n/[        R&                  " U/5      U U(U*-   :*  -  n0[        R&                  " U/U0-  5      n1U%U U/   -  U(-  U!U/'   U'U.U/'   TS:”  a  U%T-  U U0   U(-
  T-  U)-  -   ST-  -  U!U0'   O9T[        R                  " U U0   U(-
  [        R                  " T5      -  5      -  U!U0'   U)U!U0   TS-
  -  -  U.U0'   [        R                  " U&* T-  S-  5      TU U1   U(-
  U*-
  -  SU+-  -  -
  n2ST-  [        R                  " U25      -  U!U1'   U+[        R                  " U!U1   * T-  S-  5      -  U.U1'   [        R                  " UU.-  5      T R                  U!TT5      :*  n"[!        U"5      n#U#S:”  a  U!U"   X¼UU#-   & UU#-  nXÊ:  a  GMÛ  [        R(                  " X¹5      n!U(       a  SU!-  n!U!$ )NFr   r   Tr£   rW   rÌ  r;  é   iåÿÿÿrt  c                 ó0   >• TR                  U TT5      T-
  $ rO   ©rè  )rv   r˜   ÚlmrV  rE   s    €€€€r6   ÚlogqpdfÚ,geninvgauss_gen._rvs_scalar.<locals>.logqpdfâ  s   ø€ Ø×,Ñ,¨Q°°1Ó5¸Ñ:Ð:r8   c                 ó*   >• TR                  U TT5      $ rO   r	  )rv   r˜   rV  rE   s    €€€r6   r	  r		  ð  s   ø€ Ø×,Ñ,¨Q°°1Ó5Ð5r8   zvmin must be smaller than vmax.zumax must be positive.rÊ  iPÃ  z2Not a single random variate could be generated in zH attempts. Sampling does not appear to work for the provided parameters.)r   r   )Ú_moderk  rQ   r&  rý  Ú
atleast_1dr_  ÚzerosÚarccosrQ  r  rè  rÒ   r!  rË  r  rî  r›  rQ  Úlogical_notrÂ  )4rE   rV  r˜   r 	  rô   Ú
invert_resr  Ú
ratio_unifÚ
mode_shiftÚsize1dÚNrv   Ú	simulatedÚa2Úa1Úp1Úq1Úphirš  Úroot1Úroot2Úd1Úd2ÚvminÚvmaxÚumaxr	  rj  Úxplusra  rz  rÌ  r%  r7  ÚacceptÚ
num_acceptr[   r�  ÚxsÚk1ÚA1Úk2ÚA2Úk3ÚA3r
  rž  Úcond1Úcond2Úcond3rë  r	  s4   ```                                                @r6   rù  Úgeninvgauss_gen._rvs_scalar©  sæ  û€ ð ˆ
ÞØˆJØˆq‹5à�ˆAØˆJØ�J‰J�q˜!Óˆð ˆ
Ø�‹6�Q˜“Uà‰JØ”#�c˜1œrŸwšw q¨1¡u›~Ñ-°Ñ1Ó2Ó2à‰Jð ˆJô ”r—}’} ZÓ0Ó1ˆÜ�GŠG�F‹OˆÜ�HŠH�Q‹KˆØˆ	ççØ˜1˜q™5‘\ AÑ%¨Ñ)�Ø˜‘U˜a !™e‘_ qÑ(¨1Ñ,�à˜a™% !™)‘^�Ø˜˜Q™‘Y ‘^ b¡g°¡kÑ1°AÑ5�Ü—i’i  ¤b§g¢g¨c°B¸±E©kÓ&:Ñ :¸QÑ >Ó?�Ü—g’g˜b 2™g¨™kÓ*Ð*�ØœRŸVšV C¨!¡G¬b¯e©e°a©iÑ$7Ó8Ñ8¸2À¹6ÑA�Ø˜œbŸfšf S¨1¡W›oÑ-°°Q±Ñ6�ð ×&Ñ& q¨!¨QÓ/�Ø×&Ñ& u¨a°Ó3°bÑ8�Ø×&Ñ& u¨a°Ó3°bÑ8�ð  ™	¤R§V¢V¨C°"©HÓ%5Ñ5�Ø ™	¤R§V¢V¨C°"©HÓ%5Ñ5�Ø�÷;ð ;ð ‘ô —v’v˜c $×"3Ñ"3°A°q¸!Ó"<Ñ<Ó=�Ø˜a™%¤2§7¢7¨A°©E°A©:¸¸1¹Ñ+<Ó#=Ñ=¸qÑ@�Ø�àœrŸvšv c¨D×,=Ñ,=¸eÀQÈÓ,JÑ&JÓKÑK�Ø�÷6ð �t‹|Ü Ð!BÓCÐCØ�q‹yÜ Ð!9Ó:Ð:àˆAØ“-Ø‘M�à˜<×/Ñ/°QÐ/Ð7Ñ7�Ø ×(Ñ(¨aÐ(Ð0�Ø˜D 4™K¨1Ñ,Ñ,�Ø˜!‘e˜a‘i�àœBŸFšF 1›I™+©°«Ñ5�ÜŸVšV F›^�
Ø “>Ø<?À¹K�A ¨ZÑ!7Ð9Ø Ñ+�Ià “N¨¨1©°«ð!Ø!" 1¡ ð &?ð?�Cô ' sÓ+Ð+Ø�Q‘�ð' •-ùð, �a˜!‘e‘ˆBÜ—’˜˜Q ™U˜Ó$ˆBÜ—’˜×)Ñ)¨!¨Q°Ó2Ó3ˆBØ�b‘ˆBØ�A˜‘E‹zÜ—V’V˜Q˜B“Z�Ø�q“5Ø  A¡¨™z¨B°©EÑ1Ñ2°QÑ6‘BàœbŸfšf Q¨¨A©¡XÓ.Ñ.‘Bà‘��BØ�a˜!‘e‘ˆBØ�R‘œ"Ÿ&š& "  q¡¨1¡Ó-Ñ-°Ñ1ˆBØ�R‘˜"‘ˆAð ”-Ø‘M�ÜŸš !›¤b§h¢h¨q£k�3�à ×(Ñ(¨aÐ(Ð0�Ø˜×,Ñ,°!Ð,Ð4Ñ4�Ø˜R™�ÜŸš uÓ-°°b¸2±g±Ñ>�ÜŸš u¨u¡}Ó5�à ! E¡(™]¨RÑ/��E‘
Ø��%‘à�q“5Ø"$ a¡%¨1¨U©8°b©=¸AÑ*=ÀÑ*BÑ"BÀaÈ!ÁeÑ!L�C˜’Jà!"¤R§V¢V¨Q¨u©X¸©]¼b¿fºfÀQ»iÑ,GÓ%HÑ!H�C˜‘JØ  E¡
¨Q°©UÑ 3Ñ3��%‘ä—F’F˜B˜3 ™7 Q™;Ó'¨!¨q°©x¸"©}¸rÑ/AÑ*BÀaÈ"ÁfÑ*MÑM�Ø !™V¤b§f¢f¨Q£iÑ/��E‘
Ø¤§¢¨¨E©
 {°Q¡¸Ñ':Ó ;Ñ;��%‘äŸ&š&  Q¡›-¨4×+<Ñ+<¸SÀ!ÀQÓ+GÑG�Ü  ›[�
Ø “>Ø<?À¹K�A ¨ZÑ!7Ð9Ø Ñ+�Ið7 –-ô: �jŠj˜Ó#ˆÞØ�c‘'ˆCØˆ
r8   c                 óº   • US:  a+  U[         R                  " US-
  S-  US-  -   5      S-   U-
  -  $ [         R                  " SU-
  S-  US-  -   5      SU-
  -
  U-  $ rf  rÍ  rÐ  s      r6   r	  Úgeninvgauss_gen._modeB  sf   € àˆq‹5ØœŸš  Q¡¨¡
¨Q°©TÑ 1Ó2°QÑ6¸Ñ:Ñ;Ð;ä—G’G˜Q ™U Q™J¨¨A©Ñ-Ó.°!°a±%Ñ8¸AÑ=Ð=r8   c                 ó¬  • [         R                  " X!-   U5      n[         R                  " X#5      n[        R                  " U5      [        R                  " U5      -  nUR	                  5       (       a^  Sn[
        R                  " U[        SS9  [        R                  " U[        R                  [        R                  S9nXF)    XV)    -  X†) '   U$ XE-  nU$ )Nz…Infinite values encountered in the moment calculation involving scipy.special.kve. Values replaced by NaN to avoid incorrect results.rÌ  rÕ  ©Údtype)r~   ÚkverQ   rX   rì  r×  rØ  rÙ  Ú	full_likerF  rC  )	rE   re   rV  r˜   rg  ÚdenomÚinf_valsr[   r  s	            r6   r+  Úgeninvgauss_gen._munpI  s¥   € Ü�fŠf�Q‘U˜AÓˆÜ—’�q“ˆÜ—8’8˜C“=¤2§8¢8¨E£?Ñ2ˆØ�<‰<�>‰>ð.ˆCô �MŠM˜#œ~¸!Ò<Ü—’˜S¤"§&¡&´·
±
Ñ;ˆAØ˜y™>¨E°)Ñ,<Ñ<ˆAˆi‰Lð ˆð ‘ˆAØˆr8   r�   r-  )rŽ   r�   r�   r‘   r’   rf   ro   rü   rw   r{   rè  rõ   rù  r	  r+  r“   r�   r8   r6   rÎ  rÎ    s=   † ñ#òH"òò
ò -ò$ò3ô5ònWòr>õr8   rÎ  r_  c                   ór   ^ • \ rS rSrSr\R                  rS rS r	U 4S jr
S rS rS rSS	 jrS
 rSrU =r$ )Únorminvgauss_geni\  a’  A Normal Inverse Gaussian continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `norminvgauss` is:

.. math::

    f(x, a, b) = \frac{a \, K_1(a \sqrt{1 + x^2})}{\pi \sqrt{1 + x^2}} \,
                 \exp(\sqrt{a^2 - b^2} + b x)

where :math:`x` is a real number, the parameter :math:`a` is the tail
heaviness and :math:`b` is the asymmetry parameter satisfying
:math:`a > 0` and :math:`|b| <= a`.
:math:`K_1` is the modified Bessel function of second kind
(`scipy.special.k1`).

%(after_notes)s

A normal inverse Gaussian random variable `Y` with parameters `a` and `b`
can be expressed as a normal mean-variance mixture:
``Y = b * V + sqrt(V) * X`` where `X` is ``norm(0,1)`` and `V` is
``invgauss(mu=1/sqrt(a**2 - b**2))``. This representation is used
to generate random variates.

Another common parametrization of the distribution (see Equation 2.1 in
[2]_) is given by the following expression of the pdf:

.. math::

    g(x, \alpha, \beta, \delta, \mu) =
    \frac{\alpha\delta K_1\left(\alpha\sqrt{\delta^2 + (x - \mu)^2}\right)}
    {\pi \sqrt{\delta^2 + (x - \mu)^2}} \,
    e^{\delta \sqrt{\alpha^2 - \beta^2} + \beta (x - \mu)}

In SciPy, this corresponds to
:math:`a=\alpha \delta, b=\beta \delta, \text{loc}=\mu, \text{scale}=\delta`.

References
----------
.. [1] O. Barndorff-Nielsen, "Hyperbolic Distributions and Distributions on
       Hyperbolae", Scandinavian Journal of Statistics, Vol. 5(3),
       pp. 151-157, 1978.

.. [2] O. Barndorff-Nielsen, "Normal Inverse Gaussian Distributions and
       Stochastic Volatility Modelling", Scandinavian Journal of
       Statistics, Vol. 24, pp. 1-13, 1997.

%(example)s

c                 ó@   • US:„  [         R                  " U5      U:  -  $ rö  )rQ   Úabsolute©rE   r—   r˜   s      r6   rf   Únorminvgauss_gen._argcheck”  s   € Ø�A‘œ"Ÿ+š+ a›.¨1Ñ,Ñ-Ð-r8   c                 óž   • [        SSS[        R                  4S5      n[        SS[        R                  * [        R                  4S5      nX/$ r¥  rl   r¦  s      r6   ro   Únorminvgauss_gen._shape_info—  rë  r8   c                 ó    >• [         TU ]  USS9$ )N)r   r£   r‰  r  r€  s     €r6   rÝ  Únorminvgauss_gen._fitstartœ  s   ø€ ô ‰wÑ  ¨HÐ Ð5Ð5r8   c                 ó  • [         R                  " US-  US-  -
  5      nU[         R                  -  n[         R                  " SU5      nU[        R
                  " X&-  5      -  [         R                  " X1-  X&-  -
  U-   5      -  U-  $ r  )rQ   r&  r  Úhypotr~   Úk1erÒ   )rE   rv   r—   r˜   r6  Úfac1Úsqs          r6   rw   Únorminvgauss_gen._pdf¡  sm   € Ü—’˜˜1™˜q !™t™Ó$ˆØ”2—5‘5‰yˆÜ�XŠX�a˜‹^ˆØ”b—f’f˜Q™V“nÑ$¤r§v¢v¨a©c°A±D©j¸5Ñ.@Ó'AÑAÀBÑFÐFr8   c           
      óÖ  • [         R                  " U5      (       a3  [        R                  " U R                  U[         R
                  X#4S9S   $ [         R                  " U5      n[         R                  " U5      n/ n[        XU5       HH  u  pVnUR                  [        R                  " U R                  U[         R
                  Xg4S9S   5        MJ     [         R                  " U5      $ )Nr‰  r   )
rQ   rU  r   rO  rw   rm   r	  r  ÚappendrI  )rE   rv   r—   r˜   Úresultr�  Úa0rf  s           r6   r€   Únorminvgauss_gen._sf§  s¬   € Ü�;Š;�q�>‰>ä—>’> $§)¡)¨Q´·±¸a¸VÑDÀQÑGÐGä—’˜aÓ ˆAÜ—’˜aÓ ˆAØˆFÜ # A¨!¦‘�˜Ø—‘œiŸnšn¨T¯Y©Y¸¼B¿F¹FØ35°(ñ<Ø<=ñ?ö @ñ !-ô —8’8˜FÓ#Ð#r8   c                 óä   ^ • U 4S jn[         R                  " U5      (       a	  U" XU5      $ / n[        XU5       H  u  pgnUR                  U" XgU5      5        M      [         R                  " U5      $ )Nc                 ó^  >• U
4S jnT
R                  X5      nU" XAX 5      nUS:X  a  U$ US:”  a.  SnUnXF-   nU" X�X 5      S:”  a  SU-  nXF-   nU" X�X 5      S:”  a  M  O-SnUnXF-
  nU" XqX 5      S:  a  SU-  nXF-
  nU" XqX 5      S:  a  M  [        R                  " X7X�X 4T
R                  S9n	U	$ )Nc                 ó.   >• TR                  XU5      U-
  $ rO   ©r€   )rv   r—   r˜   r…   rE   s       €r6   ÚeqÚ6norminvgauss_gen._isf.<locals>._isf_scalar.<locals>.eq·  s   ø€ à—x‘x  aÓ(¨1Ñ,Ð,r8   r   r   rW   )rG   r™  )r%  r   rË  r™  )r…   r—   r˜   rS	  ÚxmÚemÚdeltaÚleftÚrightrL	  rE   s             €r6   Ú_isf_scalarÚ*norminvgauss_gen._isf.<locals>._isf_scalarµ  sÞ   ø€ õ-ð —‘˜1“ˆBÙ�B˜1“ˆBØ�Q‹wà�	Ø�A‹vØ�Ø�Ø™
�Ù˜ 1Ó(¨1Ó,Ø˜e™G�EØ™J�Eñ ˜ 1Ó(¨1Õ,øð
 �Ø�Ø‘z�Ù˜ !Ó'¨!Ó+Ø˜e™G�EØ™:�Dñ ˜ !Ó'¨!Õ+ô —_’_ R¨u¸q¸9Ø*.¯)©)ñ5ˆFàˆMr8   )rQ   rU  r  rK	  rI  )	rE   r…   r—   r˜   rZ	  rL	  Úq0rM	  rf  s	   `        r6   rŠ   Únorminvgauss_gen._isf´  s`   ø€ õ	ôB �;Š;�q�>‰>Ù˜q QÓ'Ð'àˆFÜ # A¨!¦‘�˜Ø—‘™k¨"°"Ó5Ö6ñ !-ä—8’8˜FÓ#Ð#r8   c                 óÎ   • [         R                  " US-  US-  -
  5      n[        R                  SU-  X4S9nX&-  [         R                  " U5      [        R                  UUS9-  -   $ )NrW   r   )r}  ró   rô   r5  )rQ   r&  rÆ  r7  r.  )rE   r—   r˜   ró   rô   r6  Úigs          r6   rõ   Únorminvgauss_gen._rvsÞ  sk   € ô —’˜˜1™˜q !™t™Ó$ˆÜ�\‰\˜Q˜u™W¨4ˆ\ÐKˆØ‰vœŸš ›¤d§h¡h°DØ<Hð '/ð 'Jñ Jñ Jð 	Jr8   c                 óÒ   • [         R                  " US-  US-  -
  5      nX#-  nUS-  US-  -  nSU-  U[         R                  " U5      -  -  nSSSUS-  -  US-  -  -   -  U-  nXEXg4$ )NrW   rÌ  r·  r   rU  rÍ  )rE   r—   r˜   r6  r%  ÚvarianceÚskewnessÚkurtosiss           r6   r   Únorminvgauss_gen._statsæ  s~   € Ü—’˜˜1™˜q !™t™Ó$ˆØ‰yˆØ�a‘4˜% ™(‘?ˆØ˜‘7˜a¤"§'¢'¨%£.Ñ0Ñ1ˆØ˜!˜a ! Q¡$™h¨¨A©™oÑ-Ñ.°Ñ6ˆØ˜xÐ1Ð1r8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  rf   ro   rÝ  rw   r€   rŠ   rõ   r   r“   r-  r.  s   @r6   r;	  r;	  \  sF   ø† ñ4ðj "×4Ñ4€Mò.òõ
6ò
Gò$ò($ôTJ÷2ð 2r8   r;	  Únorminvgaussc                   óx   ^ • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	 rS
 rSU 4S jjrSrU =r$ )Úinvweibull_geniò  uD  An inverted Weibull continuous random variable.

This distribution is also known as the FrÃ©chet distribution or the
type II extreme value distribution.

%(before_notes)s

Notes
-----
The probability density function for `invweibull` is:

.. math::

    f(x, c) = c x^{-c-1} \exp(-x^{-c})

for :math:`x > 0`, :math:`c > 0`.

`invweibull` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

References
----------
F.R.S. de Gusmao, E.M.M Ortega and G.M. Cordeiro, "The generalized inverse
Weibull distribution", Stat. Papers, vol. 52, pp. 591-619, 2011.

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úinvweibull_gen._shape_info  r5  r8   c                 ó    • [         R                  " X* S-
  5      n[         R                  " X* 5      n[         R                  " U* 5      nX#-  U-  $ r>  ©rQ   ri  rÒ   )rE   rv   rj  Úxc1Úxc2s        r6   rw   Úinvweibull_gen._pdf  s@   € ä�hŠh�q˜"˜s™(Ó#ˆÜ�hŠh�q˜"‹oˆÜ�fŠf�c�T‹lˆØ‰w˜‰}Ðr8   c                 ó^   • [         R                  " X* 5      n[         R                  " U* 5      $ rO   rl	  )rE   rv   rj  rm	  s       r6   r{   Úinvweibull_gen._cdf  s!   € Ü�hŠh�q˜"‹oˆÜ�vŠv�s�d‹|Ðr8   c                 ó8   • [         R                  " X* -  * 5      * $ rO   )rQ   rt  rn  s      r6   r€   Úinvweibull_gen._sf   s   € Ü—’˜!˜R™%˜Ó Ð Ð r8   c                 ó`   • [         R                  " [         R                  " U5      * SU-  5      $ r±  )rQ   ri  r  ru  s      r6   r†   Úinvweibull_gen._ppf#  s!   € Ü�xŠxœŸš ›˜
 D¨¡FÓ+Ð+r8   c                 ó>   • [         R                  " U* 5      * SU-  -  $ ©Nr  r©  rˆ  s      r6   rŠ   Úinvweibull_gen._isf&  s   € Ü—’˜1˜"“�  A¡Ñ&Ð&r8   c                 ó8   • [         R                  " SX-  -
  5      $ ra   r@  r  s      r6   r+  Úinvweibull_gen._munp)  s   € Ü�xŠx˜˜A™E™	Ó"Ð"r8   c                 óV   • S[         -   [         U-  -   [        R                  " U5      -
  $ ra   r^  r	  s     r6   r  Úinvweibull_gen._entropy,  s"   € Ø”‰xœ& 1™*Ñ$¤r§v¢v¨a£yÑ0Ð0r8   c                 ó,   >• Uc  SOUn[         TU ]  XS9$ )N)rÑ   r‰  r  ©rE   rF   rG   rÞ  s      €r6   rÝ  Úinvweibull_gen._fitstart/  s!   ø€ à™‰v¨4ˆÜ‰wÑ  Ð Ð1Ð1r8   r�   rO   )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rw   r{   r€   r†   rŠ   r+  r  rÝ  r“   r-  r.  s   @r6   rh	  rh	  ò  sH   ø† ñð: "×4Ñ4€MòEòòò!ò,ò'ò#ò1÷2õ 2r8   rh	  Ú
invweibullc                   óF   • \ rS rSrSrS rS rSS jrS rS r	S	 r
S
 rSrg)Újf_skew_t_geni8  a   Jones and Faddy skew-t distribution.

%(before_notes)s

Notes
-----
The probability density function for `jf_skew_t` is:

.. math::

    f(x; a, b) = C_{a,b}^{-1}
                \left(1+\frac{x}{\left(a+b+x^2\right)^{1/2}}\right)^{a+1/2}
                \left(1-\frac{x}{\left(a+b+x^2\right)^{1/2}}\right)^{b+1/2}

for real numbers :math:`a>0` and :math:`b>0`, where
:math:`C_{a,b} = 2^{a+b-1}B(a,b)(a+b)^{1/2}`, and :math:`B` denotes the
beta function (`scipy.special.beta`).

When :math:`a<b`, the distribution is negatively skewed, and when
:math:`a>b`, the distribution is positively skewed. If :math:`a=b`, then
we recover the `t` distribution with :math:`2a` degrees of freedom.

`jf_skew_t` takes :math:`a` and :math:`b` as shape parameters.

%(after_notes)s

References
----------
.. [1] M.C. Jones and M.J. Faddy. "A skew extension of the t distribution,
       with applications" *Journal of the Royal Statistical Society*.
       Series B (Statistical Methodology) 65, no. 1 (2003): 159-174.
       :doi:`10.1111/1467-9868.00378`

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ r¥  rl   r¦  s      r6   ro   Újf_skew_t_gen._shape_info]  rª  r8   c                 ó,  • SX#-   S-
  -  [         R                  " X#5      -  [        R                  " X#-   5      -  nSU[        R                  " X#-   US-  -   5      -  -   US-   -  nSU[        R                  " X#-   US-  -   5      -  -
  US-   -  nXV-  U-  $ ©NrW   r   r£   )r~   r­  rQ   r&  )rE   rv   r—   r˜   rj  r	  r	  s          r6   rw   Újf_skew_t_gen._pdfb  s�   € Ø�!‘%˜!‘)ÑœrŸwšw q›}Ñ,¬r¯wªw°q±u«~Ñ=ˆØ�!”b—g’g˜a™e a¨1¡f™nÓ-Ñ-Ñ-°1°s±7Ñ;ˆØ�!”b—g’g˜a™e a¨1¡f™nÓ-Ñ-Ñ-°1°s±7Ñ;ˆØ‰w˜‰{Ðr8   Nc                 ó®   • UR                  XU5      nSU-  S-
  [        R                  " X-   5      -  nS[        R                  " USU-
  -  5      -  nXg-  $ r  )r­  rQ   r&  )rE   r—   r˜   ró   rô   r	  r	  Úd3s           r6   rõ   Újf_skew_t_gen._rvsh  sR   € Ø×Ñ˜q TÓ*ˆØ�"‰f�q‰jœBŸGšG A¡E›NÑ*ˆØ”—’˜˜q 2™v™Ó'Ñ'ˆØ‰wˆr8   c                 ó~   • SU[         R                  " X#-   US-  -   5      -  -   S-  n[        R                  " X#U5      $ ©Nr   rW   r£   )rQ   r&  r~   r¾  ©rE   rv   r—   r˜   r�  s        r6   r{   Újf_skew_t_gen._cdfn  s:   € Ø�”R—W’W˜Q™U Q¨!¡V™^Ó,Ñ,Ñ,°Ñ3ˆÜ�zŠz˜! Ó"Ð"r8   c                 ó~   • SU[         R                  " X#-   US-  -   5      -  -   S-  n[        R                  " X#U5      $ rŒ	  )rQ   r&  r~   rÁ  r�	  s        r6   r€   Újf_skew_t_gen._sfr  s:   € Ø�”R—W’W˜Q™U Q¨!¡V™^Ó,Ñ,Ñ,°Ñ3ˆÜ�{Š{˜1 Ó#Ð#r8   c                 ó¶   • [         R                  XU5      nSU-  S-
  [        R                  " X#-   5      -  nS[        R                  " USU-
  -  5      -  nXV-  $ r  )r­  r¼  rQ   r&  )rE   r…   r—   r˜   r	  r	  r‰	  s          r6   r†   Újf_skew_t_gen._ppfv  sP   € Ü�X‰X�a˜AÓˆØ�"‰f�q‰jœBŸGšG A¡E›NÑ*ˆØ”—’˜˜q 2™v™Ó'Ñ'ˆØ‰wˆr8   c           	      óÈ   • S nUSU-  :„  USU-  :„  -  US:¬  -  n[         R                  " UXU4[        R                  " U[        R                  /S9[        R
                  S9$ )z…Returns the n-th moment(s) where all the following hold:

- n >= 0
- a > n / 2
- b > n / 2

The result is np.nan in all other cases.
c                 óp  • X-   SU -  -  nSU -  [         R                  " X5      -  n[        R                  " U S-   5      n[        R                  " US-  S:„  SS5      n[         R                  " USU -  -   U-
  USU -  -
  U-   5      n[         R
                  " X5      U-  U-  nX4-  UR                  5       -  $ )zOComputes E[T^(n_k)] where T is skew-t distributed with
parameters a_k and b_k.
r£   rW   r   r   r  )r~   r­  rQ   rÁ  rÃ  r  rî  )	Ún_kÚa_kÚb_krg  r7	  Úindicesr·  r'  Ú	sum_termss	            r6   Ú
nth_momentÚ'jf_skew_t_gen._munp.<locals>.nth_moment…  s¬   € ð ‘9 #¨¡)Ñ,ˆCØ˜‘HœrŸwšw sÓ0Ñ0ˆEä—i’i  a¡Ó(ˆGÜ—(’(˜7 Q™;¨™?¨B°Ó2ˆCÜ—’˜˜c C™i™¨'Ñ1°3¸¸s¹±?ÀWÑ3LÓMˆAÜŸš Ó-°Ñ3°aÑ7ˆIà‘; §¡£Ñ0Ð0r8   r£   r   r@  r  ©r#  r$  rQ   r7  rC  rF  )rE   re   r—   r˜   rš	  Únth_moment_valids         r6   r+  Újf_skew_t_gen._munp|  sc   € ò	1ð   a¡™K¨A°°a±©KÑ8¸AÀ¹FÑCÐÜ�ŠØØ�1ˆIÜ�LŠL˜¬R¯Z©Z¨LÑ9Ü—v‘vñ	
ð 	
r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rw   rõ   r{   r€   r†   r+  r“   r�   r8   r6   r‚	  r‚	  8  s+   † ñ#òHò
ôò#ò$òõ
r8   r‚	  Ú	jf_skew_tc                   óZ   • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	 rS
rg)Újohnsonsb_geniŸ  aá  A Johnson SB continuous random variable.

%(before_notes)s

See Also
--------
johnsonsu

Notes
-----
The probability density function for `johnsonsb` is:

.. math::

    f(x, a, b) = \frac{b}{x(1-x)}  \phi(a + b \log \frac{x}{1-x} )

where :math:`x`, :math:`a`, and :math:`b` are real scalars; :math:`b > 0`
and :math:`x \in [0,1]`.  :math:`\phi` is the pdf of the normal
distribution.

`johnsonsb` takes :math:`a` and :math:`b` as shape parameters.

%(after_notes)s

%(example)s

c                 ó   • US:„  X:H  -  $ rö  r�   r>	  s      r6   rf   Újohnsonsb_gen._argcheck½  ó   € Ø�A‘˜!™&Ñ!Ð!r8   c                 óž   • [        SS[        R                  * [        R                  4S5      n[        SSS[        R                  4S5      nX/$ ©Nr—   Fr3  r˜   r   rl   r¦  s      r6   ro   Újohnsonsb_gen._shape_infoÀ  rÔ  r8   c                 ól   • [        X#[        R                  " U5      -  -   5      nUS-  USU-
  -  -  U-  $ r“  )rÕ   r~   r   )rE   rv   r—   r˜   Útrms        r6   rw   Újohnsonsb_gen._pdfÅ  s6   € ä˜œbŸhšh q›k™MÑ)Ó*ˆØ�‰u�a˜˜1™‘g‰˜sÑ"Ð"r8   c                 óJ   • [        X#[        R                  " U5      -  -   5      $ rO   )rÛ   r~   r   r´  s       r6   r{   Újohnsonsb_gen._cdfÊ  s   € Ü˜œrŸxšx¨›{™]Ñ*Ó+Ð+r8   c                 óR   • [         R                  " SU-  [        U5      U-
  -  5      $ r>  )r~   r  râ   rÈ  s       r6   r†   Újohnsonsb_gen._ppfÍ  ó#   € Ü�xŠx˜˜a™¤9¨Q£<°!Ñ#3Ñ4Ó5Ð5r8   c                 óJ   • [        X#[        R                  " U5      -  -   5      $ rO   )rå   r~   r   r´  s       r6   r€   Újohnsonsb_gen._sfÐ  s   € Ü˜œbŸhšh q›k™MÑ)Ó*Ð*r8   c                 óR   • [         R                  " SU-  [        U5      U-
  -  5      $ r>  )r~   r  rë   rÈ  s       r6   rŠ   Újohnsonsb_gen._isfÓ  r¯	  r8   r�   N)rŽ   r�   r�   r‘   r’   r   rI  rJ  rf   ro   rw   r{   r†   r€   rŠ   r“   r�   r8   r6   r¡	  r¡	  Ÿ  s7   † ñð6 "×4Ñ4€Mò"òò
#ò
,ò6ò+õ6r8   r¡	  Ú	johnsonsbc                   óL   • \ rS rSrSrS rS rS rS rS r	S r
S	 rSS
 jrSrg)Újohnsonsu_geniÚ  aÕ  A Johnson SU continuous random variable.

%(before_notes)s

See Also
--------
johnsonsb

Notes
-----
The probability density function for `johnsonsu` is:

.. math::

    f(x, a, b) = \frac{b}{\sqrt{x^2 + 1}}
                 \phi(a + b \log(x + \sqrt{x^2 + 1}))

where :math:`x`, :math:`a`, and :math:`b` are real scalars; :math:`b > 0`.
:math:`\phi` is the pdf of the normal distribution.

`johnsonsu` takes :math:`a` and :math:`b` as shape parameters.

The first four central moments are calculated according to the formulas
in [1]_.

%(after_notes)s

References
----------
.. [1] Taylor Enterprises. "Johnson Family of Distributions".
   https://variation.com/wp-content/distribution_analyzer_help/hs126.htm

%(example)s

c                 ó   • US:„  X:H  -  $ rö  r�   r>	  s      r6   rf   Újohnsonsu_gen._argcheckþ  r¤	  r8   c                 óž   • [        SS[        R                  * [        R                  4S5      n[        SSS[        R                  4S5      nX/$ r¦	  rl   r¦  s      r6   ro   Újohnsonsu_gen._shape_info  rÔ  r8   c                 ó–   • X-  n[        X#[        R                  " U5      -  -   5      nUS-  [        R                  " US-   5      -  U-  $ r>  )rÕ   rQ   Úarcsinhr&  )rE   rv   r—   r˜   r  r©	  s         r6   rw   Újohnsonsu_gen._pdf  sE   € ð ‰SˆÜ˜¤§
¢
¨1£Ñ-Ñ-Ó.ˆØ�‰u”R—W’W˜R ™V“_Ñ$ SÑ(Ð(r8   c                 óJ   • [        X#[        R                  " U5      -  -   5      $ rO   )rÛ   rQ   r¼	  r´  s       r6   r{   Újohnsonsu_gen._cdf  s   € Ü˜¤§¢¨A£Ñ.Ñ.Ó/Ð/r8   c                 óL   • [         R                  " [        U5      U-
  U-  5      $ rO   )rQ   Úsinhrâ   rÈ  s       r6   r†   Újohnsonsu_gen._ppf  ó   € Ü�wŠwœ	 !› qÑ(¨AÑ-Ó.Ð.r8   c                 óJ   • [        X#[        R                  " U5      -  -   5      $ rO   )rå   rQ   r¼	  r´  s       r6   r€   Újohnsonsu_gen._sf  s   € Ü˜¤§
¢
¨1£Ñ-Ñ-Ó.Ð.r8   c                 óL   • [         R                  " [        U5      U-
  U-  5      $ rO   )rQ   rÁ	  rë   r´  s       r6   rŠ   Újohnsonsu_gen._isf  rÃ	  r8   c                 ó¢  • Su  pEpgUS-  n[         R                  " U5      n	X-  n
SU;   a  U	S-  * [         R                  " U
5      -  nSU;   a9  S[        R                  " U5      -  U	[         R
                  " SU
-  5      -  S-   -  nSU;   a�  U	S-  [        R                  " U5      S-  -  nS	[         R                  " U
5      -  nX™S-   -  [         R                  " S	U
-  5      -  n[         R                  " S5      SU	[         R
                  " SU
-  5      -  -   S
-  -  nU* XÍ-   -  U-  nSU;   a�  S	SU	-  -   nSU	S-  -  U	S-   -  [         R
                  " SU
-  5      -  nU	S-  [         R
                  " SU
-  5      -  nSS	U	S-  -  -   SU	S	-  -  -   U	S-  -   nSSU	[         R
                  " SU
-  5      -  -   S-  -  nX¼-   Xß-  -   U-  S	-
  nXEXg4$ )Nr  rþ  r  r£   r%  rW   r   rx  rÌ  rg  rz  rË  rU  rs  )rQ   rÒ   rÁ	  r~   rt  r[  r&  )rE   r—   r˜   r}  r}  r~  r  r€  Úbn2Úexpbn2Úa_br  r  r  r7	  r  s                   r6   r   Újohnsonsu_gen._stats  sÏ  € ð 1‰ˆ�à�‰fˆÜ—’˜“ˆØ‰eˆà�'‹>Ø˜#‘+�¤§¢¨£Ñ,ˆBØ�'‹>Ø”b—h’h˜s“mÑ# V¬B¯GªG°A°c±E«NÑ%:¸QÑ%>Ñ?ˆCØ�'‹>Ø˜‘œbŸhšh s›m¨SÑ0Ñ0ˆBØ”2—7’7˜3“<‘ˆBØ A™:Ñ&¬¯ª°°3±«Ñ7ˆBÜ—G’G˜A“J ! f¬r¯wªw°q¸±u«~Ñ&=Ñ"=ÀÑ!EÑEˆEØ�˜™‘ 5Ñ(ˆBØ�'‹>Ø�Q�v‘X‘ˆBØ�6˜1‘9‘ ¨¡
Ñ+¬b¯gªg°a¸±e«nÑ<ˆBØ˜‘œRŸWšW Q s¡U›^Ñ+ˆBØ�a˜ ™	‘kÑ! A f¨a¡i¡KÑ/°&¸!±)Ñ;ˆBØ�q˜6¤"§'¢'¨!¨C©%£.Ñ0Ñ0°1Ñ4Ñ4ˆEØ‘'˜B™E‘/ UÑ*¨QÑ.ˆBØ˜ˆÐr8   r�   Nr‚  )rŽ   r�   r�   r‘   r’   rf   ro   rw   r{   r†   r€   rŠ   r   r“   r�   r8   r6   r¶	  r¶	  Ú  s0   † ñ"òF"òò
)ò0ò/ò/ò/÷r8   r¶	  Ú	johnsonsuc                   ób   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rSS jrSS jrSrg)Ú
landau_geni:  a¸  A Landau continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `landau` ([1]_, [2]_) is:

.. math::

    f(x) = \frac{1}{\pi}\int_0^\infty \exp(-t \log t - xt)\sin(\pi t) dt

for a real number :math:`x`.

%(after_notes)s

Often (e.g. [2]_), the Landau distribution is parameterized in terms of a
location parameter :math:`\mu` and scale parameter :math:`c`, the latter of
which *also* introduces a location shift. If ``mu`` and ``c`` are used to
represent these parameters, this corresponds with SciPy's parameterization
with ``loc = mu + 2*c / np.pi * np.log(c)`` and ``scale = c``.

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

References
----------
.. [1] Landau, L. (1944). "On the energy loss of fast particles by
       ionization". J. Phys. (USSR). 8: 201.
.. [2] "Landau Distribution", Wikipedia,
       https://en.wikipedia.org/wiki/Landau_distribution
.. [3] Chambers, J. M., Mallows, C. L., & Stuck, B. (1976).
       "A method for simulating stable random variables."
       Journal of the American Statistical Association, 71(354), 340-344.
.. [4] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.
.. [5] Yoshimura, T. "Numerical Evaluation and High Precision Approximation
       Formula for Landau Distribution".
       :doi:`10.36227/techrxiv.171822215.53612870/v2`

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úlandau_gen._shape_infof  r¼   r8   c                 ó   • g)NgÚïXÐ(û@r�   rn   s    r6   r  Úlandau_gen._entropyi  s   € à"r8   c                 ó2   • [         R                  " USS5      $ r#  )rs   Ú_landau_pdfr¿   s     r6   rw   Úlandau_gen._pdfm  r&  r8   c                 ó2   • [         R                  " USS5      $ r#  )rs   Ú_landau_cdfr¿   s     r6   r{   Úlandau_gen._cdfp  r&  r8   c                 ó2   • [         R                  " USS5      $ r#  )rs   Ú
_landau_sfr¿   s     r6   r€   Úlandau_gen._sfs  s   € Ü�~Š~˜a  AÓ&Ð&r8   c                 ó2   • [         R                  " USS5      $ r#  )rs   Ú_landau_ppfr¸  s     r6   r†   Úlandau_gen._ppfv  r&  r8   c                 ó2   • [         R                  " USS5      $ r#  )rs   Ú_landau_isfr¸  s     r6   rŠ   Úlandau_gen._isfy  r&  r8   c                 ó~   • [         R                  [         R                  [         R                  [         R                  4$ rO   r-  rn   s    r6   r   Úlandau_gen._stats|  r/  r8   c                 ó2   • US:”  a  [         R                  $ S$ r#  r-  rd   s     r6   r+  Úlandau_gen._munp  s   € Ø˜Q›Œr�v‰vÐ% AÐ%r8   Nc                 ó–   • [        U[        5      (       a  UR                  5       n[        R                  " U/ SQ5      u  p4nXEU-
  S-  4$ r4  r9  r;  s         r6   rÝ  Úlandau_gen._fitstart‚  r@  r8   c                 óz  • [         R                  S-  nUR                  [         R                  * S-  [         R                  S-  US9nUR                  US9nS[         R                  -  X4-   [         R                  " U5      -  [         R
                  " X5-  [         R                  " U5      -  X4-   -  5      -
  -  nU$ )NrW   rÊ  )rQ   r  rË  rû  rì  r  rQ  )rE   ró   rô   Úpi_2ÚUÚWÚSs          r6   rõ   Úlandau_gen._rvs‰  sœ   € ä�u‰u�q‰yˆØ× Ñ ¤"§%¡% ¨!¡¬R¯U©U°Q©Y¸TÐ ÐBˆØ×-Ñ-°4Ð-Ð8ˆØ”—‘‰I˜$™(¤b§f¢f¨Q£iÑ/ÜŸ6š6 4¡8¬b¯fªf°Q«iÑ#7¸D¹HÑ"EÓFñGñ Hˆàˆr8   r�   rO   r-  )rŽ   r�   r�   r‘   r’   ro   r  rw   r{   r€   r†   rŠ   r   r+  rÝ  rõ   r“   r�   r8   r6   rÏ	  rÏ	  :  s?   † ñ*òVò#ò(ò(ò'ò(ò(ò.ò&ô"÷r8   rÏ	  Úlandauc                   óv   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS r\\" \SS9S 5       5       rSrg)Úlaplace_geni–  zâA Laplace continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `laplace` is

.. math::

    f(x) = \frac{1}{2} \exp(-|x|)

for a real number :math:`x`.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úlaplace_gen._shape_infoª  r¼   r8   Nc                 ó$   • UR                  SSUS9$ )Nr   r   rÊ  )Úlaplacerò   s      r6   rõ   Úlaplace_gen._rvs­  s   € Ø×#Ñ# A q¨tÐ#Ð4Ð4r8   c                 óH   • S[         R                  " [        U5      * 5      -  $ rÛ  )rQ   rÒ   r  r¿   s     r6   rw   Úlaplace_gen._pdf°  s   € à”2—6’6œ3˜q›6˜'“?Ñ"Ð"r8   c           	      óú   • [         R                  " SS9   [         R                  " US:„  SS[         R                  " U* 5      -  -
  S[         R                  " U5      -  5      sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r   r•   r£   )rQ   rs  rÃ  rÒ   r¿   s     r6   r{   Úlaplace_gen._cdf´  sM   € Ü�[Š[˜hÓ'Ü—8’8˜A ™E 3¨¬R¯VªV°Q°B«Z©Ñ#7¸¼R¿VºVÀA»Y¹ÓG÷ (×'×'ús   •AA,Á,
A:c                 ó&   • U R                  U* 5      $ rO   ©r{   r¿   s     r6   r€   Úlaplace_gen._sf¸  s   € à�y‰y˜!˜‹}Ðr8   c                 óœ   • [         R                  " US:„  [         R                  " SSU-
  -  5      * [         R                  " SU-  5      5      $ r  ©rQ   rÃ  r  rÉ   s     r6   r†   Úlaplace_gen._ppf¼  s8   € Ü�xŠx˜˜C™¤"§&¢&¨¨A¨a©C©£/Ð!1´2·6²6¸!¸A¹#³;Ó?Ð?r8   c                 ó&   • U R                  U5      * $ rO   rÓ  rÉ   s     r6   rŠ   Úlaplace_gen._isf¿  s   € à—	‘	˜!“ˆ}Ðr8   c                 ó   • g)N)r   rW   r   rÌ  r�   rn   s    r6   r   Úlaplace_gen._statsÃ  s   € Ør8   c                 ó4   • [         R                  " S5      S-   $ r  rg  rn   s    r6   r  Úlaplace_gen._entropyÆ  s   € Ü�vŠv�a‹y˜‰{Ðr8   zÒ        This function uses explicit formulas for the maximum likelihood
        estimation of the Laplace distribution parameters, so the keyword
        arguments `loc`, `scale`, and `optimizer` are ignored.

r  c                 óÎ   • [        XX#5      u  pnUc  [        R                  " U5      nUc8  [        R                  " [        R                  " X-
  5      5      [        U5      -  nXE4$ rO   )rp  rQ   Úmedianrî  r  rí  )rE   rF   rG   r5   r  r  s         r6   rC   Úlaplace_gen.fitÉ  s\   € ô 9¸Ø9=óEÑˆ�Fð ‰<Ü—9’9˜T“?ˆDà‰>Ü—f’fœRŸVšV D¡KÓ0Ó1´S¸³YÑ>ˆFàˆ|Ðr8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   r{   r€   r†   rŠ   r   r  rL   r
   r   rC   r“   r�   r8   r6   rñ	  rñ	  –  sa   † ñò&ô5ò#òHòò@òòòð Ù ð 6Fñ Gñó	Gó ó
r8   rñ	  rõ	  c                   óN   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rSrg)Úlaplace_asymmetric_geniá  u}  An asymmetric Laplace continuous random variable.

%(before_notes)s

See Also
--------
laplace : Laplace distribution

Notes
-----
The probability density function for `laplace_asymmetric` is

.. math::

   f(x, \kappa) &= \frac{1}{\kappa+\kappa^{-1}}\exp(-x\kappa),\quad x\ge0\\
                &= \frac{1}{\kappa+\kappa^{-1}}\exp(x/\kappa),\quad x<0\\

for :math:`-\infty < x < \infty`, :math:`\kappa > 0`.

`laplace_asymmetric` takes ``kappa`` as a shape parameter for
:math:`\kappa`. For :math:`\kappa = 1`, it is identical to a
Laplace distribution.

%(after_notes)s

Note that the scale parameter of some references is the reciprocal of
SciPy's ``scale``. For example, :math:`\lambda = 1/2` in the
parameterization of [1]_ is equivalent to ``scale = 2`` with
`laplace_asymmetric`.

References
----------
.. [1] "Asymmetric Laplace distribution", Wikipedia
        https://en.wikipedia.org/wiki/Asymmetric_Laplace_distribution

.. [2] Kozubowski TJ and PodgÃ³rski K. A Multivariate and
       Asymmetric Generalization of Laplace Distribution,
       Computational Statistics 15, 531--540 (2000).
       :doi:`10.1007/PL00022717`

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ )NÚkappaFr   r3  rl   rn   s    r6   ro   Ú"laplace_asymmetric_gen._shape_info  s   € Ü˜7 E¨A¬r¯v©v¨;¸ÓGÐHÐHr8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  ©rE   rv   r
  s      r6   rw   Úlaplace_asymmetric_gen._pdf  s   € Ü�vŠv�d—l‘l 1Ó,Ó-Ð-r8   c                 ó„   • SU-  nU[         R                  " US:¬  U* U5      -  nU[         R                  " X#-   5      -  nU$ rÃ  rÿ	  )rE   rv   r
  Úkapinvr»  s        r6   rü   Úlaplace_asymmetric_gen._logpdf  sB   € Ø�5‘ˆØ”"—(’(˜1 ™6 E 6¨6Ó2Ñ2ˆØŒr�vŠv�e‘lÓ#Ñ#ˆØˆ
r8   c                 óÀ   • SU-  nX#-   n[         R                  " US:¬  S[         R                  " U* U-  5      X4-  -  -
  [         R                  " X-  5      X$-  -  5      $ rÃ  ©rQ   rÃ  rÒ   ©rE   rv   r
  r
  Ú
kappkapinvs        r6   r{   Úlaplace_asymmetric_gen._cdf  s^   € Ø�5‘ˆØ‘\ˆ
Ü�xŠx˜˜Q™ØœBŸFšF A 2 e¡8Ó,¨fÑ.?Ñ@Ñ@ÜŸš˜q™xÓ(¨%Ñ*:Ñ;ó=ð 	=r8   c           	      óÀ   • SU-  nX#-   n[         R                  " US:¬  [         R                  " U* U-  5      X4-  -  S[         R                  " X-  5      X$-  -  -
  5      $ rÃ  r
  r
  s        r6   r€   Úlaplace_asymmetric_gen._sf   s`   € Ø�5‘ˆØ‘\ˆ
Ü�xŠx˜˜Q™ÜŸš ˜r %™xÓ(¨&Ñ*;Ñ<ØœBŸFšF 1¡8Ó,¨eÑ.>Ñ?Ñ?óAð 	Ar8   c                 óÈ   • SU-  nX#-   n[         R                  " XU-  :¬  [         R                  " SU-
  U-  U-  5      * U-  [         R                  " X-  U-  5      U-  5      $ ra   rÿ	  ©rE   r…   r
  r
  r
  s        r6   r†   Úlaplace_asymmetric_gen._ppf'  sg   € Ø�5‘ˆØ‘\ˆ
Ü�xŠx˜ :Ñ-Ñ-ÜŸš  Q¡¨
Ñ 2°5Ñ 8Ó9Ð9¸&Ñ@ÜŸš˜q™|¨EÑ1Ó2°5Ñ8ó:ð 	:r8   c                 óÈ   • SU-  nX#-   n[         R                  " XU-  :*  [         R                  " X-  U-  5      * U-  [         R                  " SU-
  U-  U-  5      U-  5      $ ra   rÿ	  r
  s        r6   rŠ   Úlaplace_asymmetric_gen._isf.  si   € Ø�5‘ˆØ‘\ˆ
Ü�xŠx˜ JÑ.Ñ.ÜŸš ¡¨UÑ 2Ó3Ð3°FÑ:ÜŸš  A¡ zÑ1°%Ñ7Ó8¸Ñ>ó@ð 	@r8   c                 ób  • SU-  nX!-
  nX"-  X-  -   nSS[         R                  " US5      -
  -  [         R                  " S[         R                  " US5      -   S5      -  nSS[         R                  " US5      -   -  [         R                  " S[         R                  " US5      -   S5      -  nX4XV4$ )	Nr   rÑ   rË  rU  rg  rc  rb  rW   râ  )rE   r
  r
  Úmnrð  r  r€  s          r6   r   Úlaplace_asymmetric_gen._stats5  sž   € Ø�5‘ˆØ‰^ˆØ‰m˜e™kÑ)ˆØ�!”B—H’H˜U AÓ&Ñ&Ñ'¬¯ª°´2·8²8¸EÀ1Ó3EÑ1EÀsÓ(KÑKˆØ�!”B—H’H˜U AÓ&Ñ&Ñ'¬¯ª°´2·8²8¸EÀ1Ó3EÑ1EÀqÓ(IÑIˆØ˜ˆÐr8   c                 ó@   • S[         R                  " USU-  -   5      -   $ ra   rg  ©rE   r
  s     r6   r  Úlaplace_asymmetric_gen._entropy=  s   € Ø”2—6’6˜%  %¡™-Ó(Ñ(Ð(r8   r�   NrÂ  r�   r8   r6   r
  r
  á  s8   † ñ*òVIò.òò=òAò:ò@òõ)r8   r
  Úlaplace_asymmetricc                 óì  • [        U[        5      (       d  [        R                  " U5      nUR	                  SS 5      nUR	                  SS 5      nU R
                  (       a$  [        U R
                  R                  S5      5      OSn/ n/ nU R
                  (       a�  U R
                  R                  SS5      R                  5       n	[        U	5       HT  u  p«S[        U
5      -   nUSU-   SU-   /n[        X=5      nUR                  U5        UR                  U5        Uc  MP  XãU'   MV     SS	S
SSS1Ukn[        U5      R                  U5      nU(       a  [        SU S35      e[        U5      U:”  a  [        S5      eS XE1Uk;  a  [!        S5      e[        U[        5      (       a  UR#                  5       OUn[        R$                  " U5      R'                  5       (       d  [)        S5      eU/UQUPUP7$ )Nr  r  Ú,r   Ú r·  Úfix_r.   r/   r0   r1   zUnknown keyword arguments: r2   zToo many positional arguments.r  r   )r?   r*   rQ   r"  r=   Úshapesrí  Úsplitr“  Ú	enumerateÚstrr   rK	  ÚsetÚ
differencer4   r›  rÛ  r#  r$  r!  )ÚdistrF   rG   r5   r  r  Ú
num_shapesÚfshape_keysÚfshapesr,
  r&  rx  ÚkeyÚnamesr¶  Ú
known_keysÚunknown_keysÚ
uncensoreds                     r6   rp  rp  D  sÑ  € Ü�dœL×)Ñ)Ü�zŠz˜$Óˆà�8‰8�F˜DÓ!€DØ�X‰X�h Ó%€Fà04··”�T—[‘[×&Ñ& sÓ+Ô,À€JØ€KØ€Gð
 ‡{‡{Ø—‘×$Ñ$ S¨#Ó.×4Ñ4Ó6ˆÜ˜fÖ%‰DˆAØœ˜A›‘,ˆCØ˜# ™' 6¨A¡:Ð.ˆEÜ& tÓ3ˆCØ×Ñ˜sÔ#Ø�N‰N˜3ÔØ‹Ø�S“	ñ &ð ˜ +¨xØ˜(ð2Ø%0ð2€Jä�t“9×'Ñ'¨
Ó3€LÞÜÐ5°l°^À1ÐEÓFÐFä
ˆ4ƒy�:ÓÜÐ8Ó9Ð9à�DÐ+ 7Ð+Ó+ô ð 'ó (ð 	(ô &0°´l×%CÑ%C�—‘Ô!È€JÜ�;Š;�zÓ"×&Ñ&×(Ñ(ÜÐ?Ó@Ð@àÐ)�7Ð)˜DÐ) &Ñ)Ð)r8   c                   óZ   • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	 rS
rg)Úlevy_geniu  a§  A Levy continuous random variable.

%(before_notes)s

See Also
--------
levy_stable, levy_l

Notes
-----
The probability density function for `levy` is:

.. math::

    f(x) = \frac{1}{\sqrt{2\pi x^3}} \exp\left(-\frac{1}{2x}\right)

for :math:`x > 0`.

This is the same as the Levy-stable distribution with :math:`a=1/2` and
:math:`b=1`.

%(after_notes)s

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

Calculate the first four moments:

>>> mean, var, skew, kurt = levy.stats(moments='mvsk')

Display the probability density function (``pdf``):

>>> # `levy` is very heavy-tailed.
>>> # To show a nice plot, let's cut off the upper 40 percent.
>>> a, b = levy.ppf(0), levy.ppf(0.6)
>>> x = np.linspace(a, b, 100)
>>> ax.plot(x, levy.pdf(x),
...        'r-', lw=5, alpha=0.6, label='levy pdf')

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

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

>>> rv = levy()
>>> ax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')

Check accuracy of ``cdf`` and ``ppf``:

>>> vals = levy.ppf([0.001, 0.5, 0.999])
>>> np.allclose([0.001, 0.5, 0.999], levy.cdf(vals))
True

Generate random numbers:

>>> r = levy.rvs(size=1000)

And compare the histogram:

>>> # manual binning to ignore the tail
>>> bins = np.concatenate((np.linspace(a, b, 20), [np.max(r)]))
>>> ax.hist(r, bins=bins, density=True, histtype='stepfilled', alpha=0.2)
>>> ax.set_xlim([x[0], x[-1]])
>>> ax.legend(loc='best', frameon=False)
>>> plt.show()

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úlevy_gen._shape_infoÀ  r¼   r8   c                 óœ   • S[         R                  " S[         R                  -  U-  5      -  U-  [         R                  " SSU-  -  5      -  $ ©Nr   rW   r  r=  r¿   s     r6   rw   Úlevy_gen._pdfÃ  s=   € à”2—7’7˜1œRŸU™U™7 1™9Ó%Ñ%¨Ñ)¬B¯FªF°2°q¸±s±8Ó,<Ñ<Ð<r8   c                 ó\   • [         R                  " [        R                  " SU-  5      5      $ rÛ  )r~   ÚerfcrQ   r&  r¿   s     r6   r{   Úlevy_gen._cdfÇ  s   € ä�wŠw”r—w’w˜s Q™wÓ'Ó(Ð(r8   c                 ó\   • [         R                  " [        R                  " SU-  5      5      $ rÛ  rC  r¿   s     r6   r€   Úlevy_gen._sfË  s   € Ü�vŠv”b—g’g˜c A™gÓ&Ó'Ð'r8   c                 ó,   • [        US-  5      nSX"-  -  $ ©NrW   r•   r  ©rE   r…   r¶  s      r6   r†   Úlevy_gen._ppfÎ  s   € ä˜˜!™‹nˆØ�c‘iÑ Ð r8   c                 ó@   • SS[         R                  " U5      S-  -  -  $ rf  )r~   Úerfinvr¸  s     r6   rŠ   Úlevy_gen._isfÓ  s   € Ø�!”B—I’I˜a“L !‘OÑ#Ñ$Ð$r8   c                 ó~   • [         R                  [         R                  [         R                  [         R                  4$ rO   rE  rn   s    r6   r   Úlevy_gen._statsÖ  r/  r8   r�   N©rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rw   r{   r€   r†   rŠ   r   r“   r�   r8   r6   r<
  r<
  u  s9   † ñGðP "×4Ñ4€Mòò=ò)ò(ò!ò
%õ.r8   r<
  Úlevyc                   óZ   • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	 rS
rg)Ú
levy_l_geniÝ  aÓ  A left-skewed Levy continuous random variable.

%(before_notes)s

See Also
--------
levy, levy_stable

Notes
-----
The probability density function for `levy_l` is:

.. math::
    f(x) = \frac{1}{|x| \sqrt{2\pi |x|}} \exp{ \left(-\frac{1}{2|x|} \right)}

for :math:`x < 0`.

This is the same as the Levy-stable distribution with :math:`a=1/2` and
:math:`b=-1`.

%(after_notes)s

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

Calculate the first four moments:

>>> mean, var, skew, kurt = levy_l.stats(moments='mvsk')

Display the probability density function (``pdf``):

>>> # `levy_l` is very heavy-tailed.
>>> # To show a nice plot, let's cut off the lower 40 percent.
>>> a, b = levy_l.ppf(0.4), levy_l.ppf(1)
>>> x = np.linspace(a, b, 100)
>>> ax.plot(x, levy_l.pdf(x),
...        'r-', lw=5, alpha=0.6, label='levy_l pdf')

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

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

>>> rv = levy_l()
>>> ax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')

Check accuracy of ``cdf`` and ``ppf``:

>>> vals = levy_l.ppf([0.001, 0.5, 0.999])
>>> np.allclose([0.001, 0.5, 0.999], levy_l.cdf(vals))
True

Generate random numbers:

>>> r = levy_l.rvs(size=1000)

And compare the histogram:

>>> # manual binning to ignore the tail
>>> bins = np.concatenate(([np.min(r)], np.linspace(a, b, 20)))
>>> ax.hist(r, bins=bins, density=True, histtype='stepfilled', alpha=0.2)
>>> ax.set_xlim([x[0], x[-1]])
>>> ax.legend(loc='best', frameon=False)
>>> plt.show()

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úlevy_l_gen._shape_info'  r¼   r8   c                 ó²   • [        U5      nS[        R                  " S[        R                  -  U-  5      -  U-  [        R                  " SSU-  -  5      -  $ r@
  )r  rQ   r&  r  rÒ   ©rE   rv   rÑ  s      r6   rw   Úlevy_l_gen._pdf*  sF   € ä�‹VˆØ”—’˜œ2Ÿ5™5™ ™Ó$Ñ$ RÑ'¬¯ª¨r°1°R±4©yÓ(9Ñ9Ð9r8   c                 óh   • [        U5      nS[        S[        R                  " U5      -  5      -  S-
  $ r  )r  rÛ   rQ   r&  rW
  s      r6   r{   Úlevy_l_gen._cdf/  s,   € Ü�‹VˆØ”9˜Q¤§¢¨£™_Ó-Ñ-°Ñ1Ð1r8   c                 ób   • [        U5      nS[        S[        R                  " U5      -  5      -  $ r  )r  rå   rQ   r&  rW
  s      r6   r€   Úlevy_l_gen._sf3  s'   € Ü�‹VˆØ”8˜A¤§¢¨£™OÓ,Ñ,Ð,r8   c                 ó2   • [        US-   S-  5      nSX"-  -  $ )Nr•   rW   r­  rê   rI
  s      r6   r†   Úlevy_l_gen._ppf7  s!   € Ü˜˜S™ A™Ó&ˆØ�s‘yÑ!Ð!r8   c                 ó*   • S[        US-  5      S-  -  $ )Nr  rW   r  r¸  s     r6   rŠ   Úlevy_l_gen._isf;  s   € Ø”)˜A˜a™C“. !Ñ#Ñ#Ð#r8   c                 ó~   • [         R                  [         R                  [         R                  [         R                  4$ rO   rE  rn   s    r6   r   Úlevy_l_gen._stats>  r/  r8   r�   NrP
  r�   r8   r6   rS
  rS
  Ý  s9   † ñFðN "×4Ñ4€Mòò:ò
2ò-ò"ò$õ.r8   rS
  Úlevy_lc                   ó˜   ^ • \ rS rSrSrS rSS jrS rS rS r	S r
S	 rS
 rS rS rS rS r\\" \5      U 4S j5       5       rSrU =r$ )Úlogistic_geniE  a¯  A logistic (or Sech-squared) continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `logistic` is:

.. math::

    f(x) = \frac{\exp(-x)}
                {(1+\exp(-x))^2}

`logistic` is a special case of `genlogistic` with ``c=1``.

Remark that the survival function (``logistic.sf``) is equal to the
Fermi-Dirac distribution describing fermionic statistics.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úlogistic_gen._shape_info]  r¼   r8   c                 ó    • UR                  US9$ rù  )Úlogisticrò   s      r6   rõ   Úlogistic_gen._rvs`  s   € Ø×$Ñ$¨$Ð$Ð/Ð/r8   c                 óL   • [         R                  " U R                  U5      5      $ rO   r<  r¿   s     r6   rw   Úlogistic_gen._pdfc  rœ  r8   c                 ó�   • [         R                  " U5      * nUS[        R                  " [         R                  " U5      5      -  -
  $ rv  )rQ   r  r~   rï  rÒ   )rE   rv   r�  s      r6   rü   Úlogistic_gen._logpdfg  s2   € Ü�VŠV�A‹YˆJˆØ�2œŸš¤§¢¨£Ó+Ñ+Ñ+Ð+r8   c                 ó.   • [         R                  " U5      $ rO   r  r¿   s     r6   r{   Úlogistic_gen._cdfk  ó   € Ü�xŠx˜‹{Ðr8   c                 ó.   • [         R                  " U5      $ rO   ©r~   Ú	log_expitr¿   s     r6   r  Úlogistic_gen._logcdfn  s   € Ü�|Š|˜A‹Ðr8   c                 ó.   • [         R                  " U5      $ rO   r  rÉ   s     r6   r†   Úlogistic_gen._ppfq  rq
  r8   c                 ó0   • [         R                  " U* 5      $ rO   r  r¿   s     r6   r€   Úlogistic_gen._sft  s   € Ü�xŠx˜˜‹|Ðr8   c                 ó0   • [         R                  " U* 5      $ rO   rs
  r¿   s     r6   r	  Úlogistic_gen._logsfw  s   € Ü�|Š|˜Q˜BÓÐr8   c                 ó0   • [         R                  " U5      * $ rO   r  rÉ   s     r6   rŠ   Úlogistic_gen._isfz  s   € Ü—’˜“ˆ|Ðr8   c                 óR   • S[         R                  [         R                  -  S-  SS4$ )Nr   r·  g333333ó?rc  rn   s    r6   r   Úlogistic_gen._stats}  s!   € Ø”"—%‘%œŸ™‘+˜c‘/ 1 gÐ-Ð-r8   c                 ó   • grv  r�   rn   s    r6   r  Úlogistic_gen._entropy€  s   € àr8   c                 ó¬  >^^
^^• UR                  SS5      (       a  [        TU ]  " T/UQ70 UD6$ [        U TX#5      u  mpE[	        T5      mU R                  T5      u  pgUR                  SU5      UR                  SU5      pvU4UU4S jjm
U4UU4S jjmU
U4S jnUb-  Uc*  [        R                  " T
U45      n	U	R                  S   nUnOVUb-  Uc*  [        R                  " TU45      n	U	R                  S   nUnO&[        R                  " X†U45      n	U	R                  u  pg[        U5      nU	R                  (       a  Xg4$ [        TU ]  " T/UQ70 UD6$ )	Nrb  Fr.   r/   c                 ót   >• TU -
  U-  n[         R                  " [        R                  " U5      5      TS-  -
  $ rD  )rQ   rî  r~   r  )r.   r/   rj  rF   re   s      €€r6   Údl_dlocÚ!logistic_gen.fit.<locals>.dl_dloc˜  s1   ø€ Ø˜‘˜uÑ$ˆAÜ—6’6œ"Ÿ(š( 1›+Ó&¨¨1©Ñ,Ð,r8   c                 óz   >• TU-
  U -  n[         R                  " U[         R                  " US-  5      -  5      T-
  $ rD  )rQ   rî  r  )r/   r.   rj  rF   re   s      €€r6   Ú	dl_dscaleÚ#logistic_gen.fit.<locals>.dl_dscaleœ  s5   ø€ Ø˜‘˜uÑ$ˆAÜ—6’6˜!œBŸGšG A a¡C›L™.Ó)¨AÑ-Ð-r8   c                 ó,   >• U u  pT" X5      T" X!5      4$ rO   r�   )Úparamsr.   r/   r„
  r‡
  s      €€r6   rœ  Úlogistic_gen.fit.<locals>.func   s   ø€ Ø‰JˆCÙ˜3Ó&©	°%Ó(=Ð=Ð=r8   r   )r3   rA   rC   rp  rí  rÝ  r=   r   rq  rv   r  Úsuccess)rE   rF   rG   r5   r  r  r.   r/   rœ  r¾  r„
  r‡
  re   rÞ  s    `        @@@€r6   rC   Úlogistic_gen.fit„  sR  ü€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä8¸¸tØ9=óEÑˆˆdä�‹Iˆð —^‘^ DÓ)‰
ˆà—X‘X˜e SÓ)¨4¯8©8°G¸UÓ+CˆUð  &÷ 	-ð 	-ð "&÷ 	.ð 	.ö	>ð Ñ $¡,Ü—-’- ¨#¨Ó0ˆCØ—%‘%˜‘(ˆCØ‰EØÑ &¡.Ü—-’- 	¨E¨8Ó4ˆCØ—E‘E˜!‘HˆEØ‰Cä—-’- ¨E lÓ3ˆCØŸ™‰JˆCô �E“
ˆØ #§§��ð 	7Ü‘W’[ Ð5¨Ò5°Ñ5ð	7r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r  r†   r€   r	  rŠ   r   r  rL   r   r   rC   r“   r-  r.  s   @r6   re
  re
  E  se   ø† ñò.ô0ò'ò,òòòòò òò.òð Ù˜MÓ*ô07ó +ó ö07r8   re
  ri
  c                   óX   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rSrg)Úloggamma_geni¼  a‰  A log gamma continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `loggamma` is:

.. math::

    f(x, c) = \frac{\exp(c x - \exp(x))}
                   {\Gamma(c)}

for all :math:`x, c > 0`. Here, :math:`\Gamma` is the
gamma function (`scipy.special.gamma`).

`loggamma` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úloggamma_gen._shape_infoÕ  r5  r8   Nc                 óž   • [         R                  " UR                  US-   US95      [         R                  " UR                  US95      U-  -   $ )Nr   rÊ  )rQ   r  r6  rË  rò  s       r6   rõ   Úloggamma_gen._rvsØ  sM   € ô —’�|×)Ñ)¨!¨a©%°dÐ)Ð;Ó<Ü—&’&˜×-Ñ-°4Ð-Ð8Ó9¸!Ñ;ñ<ð 	=r8   c                 óŽ   • [         R                  " X!-  [         R                  " U5      -
  [        R                  " U5      -
  5      $ rO   ©rQ   rÒ   r~   r  rn  s      r6   rw   Úloggamma_gen._pdfæ  s,   € ä�vŠv�a‘cœ"Ÿ&š& ›)‘m¤B§J¢J¨q£MÑ1Ó2Ð2r8   c                 óf   • X!-  [         R                  " U5      -
  [        R                  " U5      -
  $ rO   r•
  rn  s      r6   rü   Úloggamma_gen._logpdfê  s#   € Ø‰s”R—V’V˜A“Y‰¤§¢¨A£Ñ.Ð.r8   c                 óH   • [         R                  " U[        :  X4S S 5      $ )Nc                 óf   • [         R                  " X-  [        R                  " US-   5      -
  5      $ ra   r•
  rô  s     r6   r  Ú#loggamma_gen._cdf.<locals>.<lambda>þ  s    € œŸš ¡¤b§j¢j°°1±£oÑ 5Ô6r8   c                 óX   • [         R                  " U[        R                  " U 5      5      $ rO   )r~   rV  rQ   rÒ   rô  s     r6   r  r›
  ÿ  s   € œŸš Q¬¯ª¨q«	Ô2r8   ©r#  r$  r#   rn  s      r6   r{   Úloggamma_gen._cdfí  s&   € ô �ŠØ”‰L˜1˜&Ù6Ù2ó4ð 	4r8   c                 óv   • [         R                  " X!5      n[        R                  " U[        :  X1U4S S 5      $ )Nc                 óh   • [         R                  " U5      [        R                  " US-   5      -   U-  $ ra   r‚  ©rj  r…   rj  s      r6   r  Ú#loggamma_gen._ppf.<locals>.<lambda>  s"   € œRŸVšV A›Y¬¯ª°A°a±C«Ñ8¸!Ò;r8   c                 ó.   • [         R                  " U 5      $ rO   rg  r¡
  s      r6   r  r¢
    ó   € œBŸFšF 1œIr8   )r~   r_  r#  r$  r"   ©rE   r…   rj  rj  s       r6   r†   Úloggamma_gen._ppf  s6   € ô �NŠN˜1Ó ˆÜ�ŠØ”‰I˜˜a�yÙ;Ù%ó'ð 	'r8   c                 óH   • [         R                  " U[        :  X4S S 5      $ )Nc                 óh   • [         R                  " X-  [        R                  " US-   5      -
  5      * $ ra   )rQ   rt  r~   r  rô  s     r6   r  Ú"loggamma_gen._sf.<locals>.<lambda>  s#   € œ"Ÿ(š( 1¡3¬¯ª°A°a±C«Ñ#8Ó9Ñ9r8   c                 óX   • [         R                  " U[        R                  " U 5      5      $ rO   )r~   rZ  rQ   rÒ   rô  s     r6   r  r©
    s   € œŸš a¬¯ª°«Ô3r8   r�
  rn  s      r6   r€   Úloggamma_gen._sf
  s$   € ä�ŠØ”‰L˜1˜&Ù9Ù3ó5ð 	5r8   c                 óv   • [         R                  " X!5      n[        R                  " U[        :  X1U4S S 5      $ )Nc                 ój   • [         R                  " U* 5      [        R                  " US-   5      -   U-  $ ra   )rQ   rï  r~   r  r¡
  s      r6   r  Ú#loggamma_gen._isf.<locals>.<lambda>  s$   € œRŸXšX q b›\¬B¯JªJ°q¸±s«OÑ;¸QÒ>r8   c                 ó.   • [         R                  " U 5      $ rO   rg  r¡
  s      r6   r  r®
    r¤
  r8   )r~   rd  r#  r$  r"   r¥
  s       r6   rŠ   Úloggamma_gen._isf  s6   € ô �OŠO˜AÓ!ˆÜ�ŠØ”‰I˜˜a�yÙ>Ù%ó'ð 	'r8   c                 óú   • [         R                  " U5      n[         R                  " SU5      n[         R                  " SU5      [        R                  " US5      -  n[         R                  " SU5      X3-  -  nX#XE4$ )Nr   rW   rg  rÌ  )r~   rn  Ú	polygammarQ   ri  )rE   rj  r%  rð  rc	  Úexcess_kurtosiss         r6   r   Úloggamma_gen._stats  sc   € ô �zŠz˜!‹}ˆÜ�lŠl˜1˜aÓ ˆÜ—<’<  1Ó%¬¯ª°°cÓ(:Ñ:ˆÜŸ,š, q¨!Ó,°±Ñ8ˆØ˜(Ð3Ð3r8   c                 óD   • S nS n[         R                  " US:¬  XU5      $ )Nc                 ól   • [         R                  " U 5      U [         R                  " U 5      -  -
  U -   nU$ rO   )r~   r  rn  )rj  rž  s     r6   rù  Ú&loggamma_gen._entropy.<locals>.regular$  s+   € Ü—
’
˜1“ ¤B§J¢J¨q£MÑ 1Ñ1°AÑ5ˆAØˆHr8   c                 óœ   • S[         R                  " U 5      -  U S-  S-  -   U S-  S-  -
  U S-  S-  -   n[        R                  5       U-   nU$ )Nr@  r­  rË  rÿ  r½  r  éÒ   )rQ   r  r.  r  )rj  Útermrž  s      r6   r  Ú)loggamma_gen._entropy.<locals>.asymptotic(  sO   € àœŸš˜q›	‘> A s¡F¨1¡HÑ,¨q°#©v°b©yÑ8¸1¸c¹6À#¹:ÑEˆDÜ—‘“ $Ñ&ˆAØˆHr8   é-   rK  )rE   rj  rù  r  s       r6   r  Úloggamma_gen._entropy#  s%   € ò	ò	ô �Š˜q B™w¨°wÓ?Ð?r8   r�   r-  ©rŽ   r�   r�   r‘   r’   ro   rõ   rw   rü   r{   r†   r€   rŠ   r   r  r“   r�   r8   r6   r�
  r�
  ¼  s;   † ñò0Eô=ò3ò/ò4ò('ò5ò'ò4õ@r8   r�
  Úloggammac                   ó|   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 r\\" \5      U 4S j5       5       rSrU =r$ )Úloglaplace_geni4  a  A log-Laplace continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `loglaplace` is:

.. math::

    f(x, c) = \begin{cases}\frac{c}{2} x^{ c-1}  &\text{for } 0 < x < 1\\
                           \frac{c}{2} x^{-c-1}  &\text{for } x \ge 1
              \end{cases}

for :math:`c > 0`.

`loglaplace` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

Suppose a random variable ``X`` follows the Laplace distribution with
location ``a`` and scale ``b``.  Then ``Y = exp(X)`` follows the
log-Laplace distribution with ``c = 1 / b`` and ``scale = exp(a)``.

References
----------
T.J. Kozubowski and K. Podgorski, "A log-Laplace growth rate model",
The Mathematical Scientist, vol. 28, pp. 49-60, 2003.

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úloglaplace_gen._shape_infoU  r5  r8   c                 óV   • US-  n[         R                  " US:  X"* 5      nX1US-
  -  -  $ rï  ©rQ   rÃ  )rE   rv   rj  Úcd2s       r6   rw   Úloglaplace_gen._pdfX  s3   € ð �‰eˆÜ�HŠH�Q˜‘U˜A˜rÓ"ˆØ�q˜‘s‘8‰|Ðr8   c                 óT   • [         R                  " US:  SX-  -  SSX* -  -  -
  5      $ ©Nr   r£   rÅ
  rn  s      r6   r{   Úloglaplace_gen._cdf_  s+   € Ü�xŠx˜˜A™˜s 1¡4™x¨¨3¨q°2©w©;©Ó7Ð7r8   c                 óT   • [         R                  " US:  SSX-  -  -
  SX* -  -  5      $ rÉ
  rÅ
  rn  s      r6   r€   Úloglaplace_gen._sfb  s+   € Ü�xŠx˜˜A™˜q 3 q¡t¡8™|¨S°°R±©[Ó9Ð9r8   c                 ób   • [         R                  " US:  SU-  SU-  -  SSU-
  -  SU-  -  5      $ ©Nr£   rÑ   r•   rW   r­  rÅ
  ru  s      r6   r†   Úloglaplace_gen._ppfe  s7   € Ü�xŠx˜˜C™ # a¡%¨3¨q©5Ñ!1°A°s¸1±u±IÀÀaÁÑ3HÓIÐIr8   c                 ób   • [         R                  " US:„  SSU-
  -  SU-  -  SU-  SU-  -  5      $ rÎ
  rÅ
  ru  s      r6   rŠ   Úloglaplace_gen._isfh  s6   € Ü�xŠx˜˜C™ # s¨Q¡w¡-°3°q±5Ñ!9¸A¸a¹CÀ4ÈÁ6¹?ÓKÐKr8   c                 óÌ   • [         R                  " SS9   US-  US-  pC[         R                  " XC:  X3U-
  -  [         R                  5      sS S S 5        $ ! , (       d  f       g = f)Nrp  rq  rW   )rQ   rs  rÃ  rm   )rE   re   rj  rã  Ún2s        r6   r+  Úloglaplace_gen._munpk  sE   € Ü�[Š[ Ó)Ø˜‘T˜1˜a™4�Ü—8’8˜B™G R°©7¡^´R·V±VÓ<÷ *×)×)ús   •6AÁ
A#c                 ó:   • [         R                  " SU-  5      S-   $ r,  rg  r	  s     r6   r  Úloglaplace_gen._entropyp  s   € Ü�vŠv�c˜!‘e‹}˜sÑ"Ð"r8   c                 óÒ  >• [        XX#5      u  ppVUc  [        [        U 5      U ]  " U/UQ70 UD6$ [        R
                  " X:*  5      (       a  [        SU[        R                  S9eUS:w  a  X-
  n[        R                  [        R                  " U5      Ub  [        R                  " U5      OS Ub  SU-  OS SS9u  pxUn	Uc  [        R                  " U5      OUn
Uc  SU-  OUnX¹U
4$ )NÚ
loglaplacerè  r   r   r;   )r  r  r1   )rp  rA   rB   rC   rQ   rì  r‡  rm   rõ	  r  rÒ   )rE   rF   rG   r5   rr  r  r  r—   r˜   r.   r/   rj  rÞ  s               €r6   rC   Úloglaplace_gen.fits  sí   ø€ ô "=¸TØ=Aó"IÑˆ�$ð ‰<Üœ˜d› TÒ.¨tÐC°dÒC¸dÑCÐCô �6Š6�$‘,×ÑÜ˜|°4¼r¿v¹vÑFÐFð �1‹9Ø‘;ˆDô �{‰{œ2Ÿ6š6 $›<Ø28Ñ2D¤§¢ v¤È$Ø*,©. ! B¢$¸dØ"'ð ð )‰ˆð ˆØ#™^”—’�q”	°ˆØ‘ZˆA�ŠE RˆØ�uˆ}Ðr8   r�   )rŽ   r�   r�   r‘   r’   ro   rw   r{   r€   r†   rŠ   r+  r  rL   r   r   rC   r“   r-  r.  s   @r6   rÁ
  rÁ
  4  sU   ø† ñò@Eòò8ò:òJòLò=ò
#ð Ù˜MÓ*ôó +ó ör8   rÁ
  rØ
  c                 óX   • [         R                  " U S:g  X4S [        R                  * S9$ )Nr   c                 óÊ   • [         R                  " U 5      S-  * SUS-  -  -  [         R                  " X-  [         R                  " S[         R                  -  5      -  5      -
  $ rD  )rQ   r  r&  r  ©rv   rx  s     r6   r  Ú!_lognorm_logpdf.<locals>.<lambda>š  sH   € ”r—v’v˜a“y !‘|�m q¨1¨a©4¡xÑ0ÜŸš˜q™u¤r§w¢w¨q´2·5±5©yÓ'9Ñ9Ó:ò;r8   r  rc  rÜ
  s     r6   Ú_lognorm_logpdfrÞ
  —  s,   € Ü�?Š?Ø	ˆQ‰��ñ	<ä—F‘F�7ñ	ð r8   c                   ó®   ^ • \ rS rSrSr\R                  rS rSS jr	S r
S rS rS rS	 rS
 rS rS rS rS r\\" \SS9U 4S j5       5       rSrU =r$ )Úlognorm_geniŸ  a9  A lognormal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `lognorm` is:

.. math::

    f(x, s) = \frac{1}{s x \sqrt{2\pi}}
              \exp\left(-\frac{\log^2(x)}{2s^2}\right)

for :math:`x > 0`, :math:`s > 0`.

`lognorm` takes ``s`` as a shape parameter for :math:`s`.

%(after_notes)s

Suppose a normally distributed random variable ``X`` has  mean ``mu`` and
standard deviation ``sigma``. Then ``Y = exp(X)`` is lognormally
distributed with ``s = sigma`` and ``scale = exp(mu)``.

%(example)s

The logarithm of a log-normally distributed random variable is
normally distributed:

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> from scipy import stats
>>> fig, ax = plt.subplots(1, 1)
>>> mu, sigma = 2, 0.5
>>> X = stats.norm(loc=mu, scale=sigma)
>>> Y = stats.lognorm(s=sigma, scale=np.exp(mu))
>>> x = np.linspace(*X.interval(0.999))
>>> y = Y.rvs(size=10000)
>>> ax.plot(x, X.pdf(x), label='X (pdf)')
>>> ax.hist(np.log(y), density=True, bins=x, label='log(Y) (histogram)')
>>> ax.legend()
>>> plt.show()

c                 ó@   • [        SSS[        R                  4S5      /$ )Nrx  Fr   r3  rl   rn   s    r6   ro   Úlognorm_gen._shape_infoÍ  r5  r8   c                 óP   • [         R                  " XR                  U5      -  5      $ rO   ©rQ   rÒ   rñ   )rE   rx  ró   rô   s       r6   rõ   Úlognorm_gen._rvsÐ  s   € Ü�vŠv�a×6Ñ6°tÓ<Ñ<Ó=Ð=r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  ©rE   rv   rx  s      r6   rw   Úlognorm_gen._pdfÓ  r³  r8   c                 ó   • [        X5      $ rO   ©rÞ
  rç
  s      r6   rü   Úlognorm_gen._logpdf×  s   € Ü˜qÓ$Ð$r8   c                 óF   • [        [        R                  " U5      U-  5      $ rO   ©rÛ   rQ   r  rç
  s      r6   r{   Úlognorm_gen._cdfÚ  s   € ÜœŸš › Q™Ó'Ð'r8   c                 óF   • [        [        R                  " U5      U-  5      $ rO   r|  rç
  s      r6   r  Úlognorm_gen._logcdfÝ  s   € ÜœBŸFšF 1›I¨™MÓ*Ð*r8   c                 óF   • [         R                  " U[        U5      -  5      $ rO   ©rQ   rÒ   râ   ©rE   r…   rx  s      r6   r†   Úlognorm_gen._ppfà  ó   € Ü�vŠv�aœ) A›,Ñ&Ó'Ð'r8   c                 óF   • [        [        R                  " U5      U-  5      $ rO   ©rå   rQ   r  rç
  s      r6   r€   Úlognorm_gen._sfã  s   € ÜœŸš˜q›	 A™Ó&Ð&r8   c                 óF   • [        [        R                  " U5      U-  5      $ rO   )rè   rQ   r  rç
  s      r6   r	  Úlognorm_gen._logsfæ  s   € Üœ2Ÿ6š6 !›9 q™=Ó)Ð)r8   c                 óF   • [         R                  " U[        U5      -  5      $ rO   ©rQ   rÒ   rë   ró
  s      r6   rŠ   Úlognorm_gen._isfé  rõ
  r8   c                 óä   • [         R                  " X-  5      n[         R                  " U5      nX"S-
  -  n[         R                  " US-
  5      SU-   -  n[         R                  " / SQU5      nX4XV4$ ©Nr   rW   )r   rW   rÌ  r   r  )rQ   rÒ   r&  Úpolyval)rE   rx  rV  r}  r~  r  r€  s          r6   r   Úlognorm_gen._statsì  s^   € Ü�FŠF�1‘3‹KˆÜ�WŠW�Q‹ZˆØ�1‘‰gˆÜ�WŠW�Q�q‘S‹\˜1˜Q™3ÑˆÜ�ZŠZÒ*¨AÓ.ˆØ˜ˆÐr8   c                 ó�   • SS[         R                  " S[         R                  -  5      -   S[         R                  " U5      -  -   -  $ ©Nr£   r   rW   r  )rE   rx  s     r6   r  Úlognorm_gen._entropyô  s3   € Ø�aœ"Ÿ&š& ¤2§5¡5¡›/Ñ)¨A´·²°q³	©MÑ9Ñ:Ð:r8   aF          When `method='MLE'` and
        the location parameter is fixed by using the `floc` argument,
        this function uses explicit formulas for the maximum likelihood
        estimation of the log-normal shape and scale parameters, so the
        `optimizer`, `loc` and `scale` keyword arguments are ignored.
        If the location is free, a likelihood maximum is found by
        setting its partial derivative wrt to location to 0, and
        solving by substituting the analytical expressions of shape
        and scale (or provided parameters).
        See, e.g., equation 3.1 in
        A. Clifford Cohen & Betty Jones Whitten (1980)
        Estimation in the Three-Parameter Lognormal Distribution,
        Journal of the American Statistical Association, 75:370, 399-404
        https://doi.org/10.2307/2287466
        

r  c                 ót  >^ ^^^^• UR                  SS5      (       a  [        TT ]  " T/UQ70 UD6$ [        T TX#5      nUu  mmnm[        R
                  " T5      nUUU4S jmUU4S jnUUU 4S jnUGcc  [        R                  " U5      n	Xi-
  n
U" U
5      nU" U
5      nSU	-  nUS:¼  a  Xm-
  n
U" U
5      nUS-  nUS:¼  a  M  [        R                  " U
5      (       a  [        R                  " U5      (       d  [        TT ]  " T/UQ70 UD6$ [        R                  " [        R                  " U
[        R                  * 5      U
S-
  5      nU" U5      nSX®-
  -  n[        R                  " U5      (       aÀ  [        R                  " U5      (       a¥  [        R                  " U5      [        R                  " U5      :X  aw  X­-
  nU" U5      nUS-  n[        R                  " U5      (       aK  [        R                  " U5      (       a0  [        R                  " U5      [        R                  " U5      :X  a  Mw  [        R                  " U5      (       a  [        R                  " U5      (       d  [        TT ]  " T/UQ70 UD6$ [        X~U
4S	9nUR                  (       d  [        TT ]  " T/UQ70 UD6$ U" UR                  5      nUU:”  a  UR                  OXi-
  nO XV:¼  a  [        S
S[        R                  S9eUnT" U5      u  nnT R!                  U5      (       a  US:”  d  [        TT ]  " T/UQ70 UD6$ UUU4$ )Nrb  Fc                 ó<  >• Tb  Tc  [         R                  " TU -
  5      nT=(       d$    [         R                  " WR                  5       5      nT=(       dD    [         R                  " [         R                  " W[         R                  " U5      -
  S-  5      5      nX24$ rD  )rQ   r  rÒ   r%  r&  )r.   Úlndatar/   rj  rF   r  Úfshapes       €€€r6   Úget_shape_scaleÚ(lognorm_gen.fit.<locals>.get_shape_scale  so   ø€ ð ‰~ ¡ÜŸš  s¡
Ó+�Ø×3œbŸfšf V§[¡[£]Ó3ˆEØ×KœbŸgšg¤b§g¢g¨v¼¿º¸u»Ñ/EÈÑ.IÓ&JÓKˆEØ�<Ðr8   c                 ó’   >• T" U 5      u  pTU -
  n[         R                  " S[         R                  " X2-  5      US-  -  -   U-  5      $ rf  ©rQ   rî  r  )r.   rj  r/   ÚshiftedrF   r	  s       €€r6   ÚdL_dLocÚ lognorm_gen.fit.<locals>.dL_dLoc  sE   ø€ á*¨3Ó/‰LˆEØ˜S‘jˆGÜ—6’6˜1œrŸvšv g¡mÓ4°U¸A±XÑ=Ñ=¸wÑFÓGÐGr8   c                 óB   >• T" U 5      u  pTR                  XU4T5      * $ rO   )Únnlf)r.   rj  r/   rF   r	  rE   s      €€€r6   ÚllÚlognorm_gen.fit.<locals>.ll  s(   ø€ á*¨3Ó/‰LˆEØ—I‘I˜u¨5Ð1°4Ó8Ð8Ð8r8   rW   g�íµ ÷Æ°¾r   r   Úlognormr”   rè  r   )r3   rA   rC   rp  rQ   rk  Úspacingr#  r?  Ú	nextafterrm   rR   r+   Ú	convergedrq  r‡  rf   )rE   rF   rG   r5   Ú
parametersr  rl  r  r  r  rT   ÚdL_dLoc_rbrackÚ	ll_rbrackrW	  rS   ÚdL_dLoc_lbrackr¾  Úll_rootr.   rj  r/   r  r  r	  rÞ  s   ``                   @@@€r6   rC   Úlognorm_gen.fit÷  sÅ  ý€ ð$ �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä0°°t¸TÓHˆ
Ø%/Ñ"ˆˆf�d˜FÜ—6’6˜$“<ˆ÷	 ö	H÷	9ð
 Š<ô —j’j Ó*ˆGØÑ'ˆFñ % V›_ˆNÙ˜6›
ˆIØ˜‘KˆEØ  EÓ)Ø!Ñ)�Ù!(¨£�Ø˜‘
�ð ! EÕ)ô
 —;’;˜v×&Ñ&¬b¯kªk¸.×.IÑ.Iô ‘w’{ 4Ð7¨$Ò7°$Ñ7Ð7ô
 —Z’Z¤§¢¨V´b·f±f°WÓ =¸vÀa¹xÓHˆFÙ$ V›_ˆNØ˜™Ñ)ˆEÜ—;’;˜v×&Ñ&¬2¯;ª;°~×+FÑ+FÜ—w’w˜~Ó.´"·'²'¸.Ó2IÓIØ™�Ù!(¨£�Ø˜‘
�ô	 —;’;˜v×&Ñ&¬2¯;ª;°~×+FÑ+FÜ—w’w˜~Ó.´"·'²'¸.Ó2IÕIô —;’;˜v×&Ñ&¬b¯kªk¸.×.IÑ.IÜ‘w’{ 4Ð7¨$Ò7°$Ñ7Ð7ô ˜g¸Ð/?Ñ@ˆCØ—=—=Ü‘w’{ 4Ð7¨$Ò7°$Ñ7Ð7ñ
 ˜Ÿ™“lˆGØ%¨	Ó1�#—(’(°xÑ7G‰Cð ÓÜ" 9°B¼b¿f¹fÑEÐEØˆCá& sÓ+‰ˆˆuØ—‘˜u×%Ñ%¨%°!«)Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3Ø�c˜5Ð Ð r8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rõ   rw   rü   r{   r  r†   r€   r	  rŠ   r   r  rL   r	   rC   r“   r-  r.  s   @r6   rà
  rà
  Ÿ  s}   ø† ñ*ðV "×4Ñ4€MòEô>ò*ò%ò(ò+ò(ò'ò*ò(òò;ð Ù˜}ð 5ñ ô Z!ó!ó ö"Z!r8   rà
  r  c                   óp   • \ rS rSrSr\R                  rS rSS jr	S r
S rS rS	 rS
 rS rS rS rSrg)Ú
gibrat_genih  a/  A Gibrat continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `gibrat` is:

.. math::

    f(x) = \frac{1}{x \sqrt{2\pi}} \exp(-\frac{1}{2} (\log(x))^2)

for :math:`x >= 0`.

`gibrat` is a special case of `lognorm` with ``s=1``.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úgibrat_gen._shape_info€  r¼   r8   Nc                 óL   • [         R                  " UR                  U5      5      $ rO   rä
  rò   s      r6   rõ   Úgibrat_gen._rvsƒ  s   € Ü�vŠv�l×2Ñ2°4Ó8Ó9Ð9r8   c                 óL   • [         R                  " U R                  U5      5      $ rO   r<  r¿   s     r6   rw   Úgibrat_gen._pdf†  rœ  r8   c                 ó   • [        US5      $ r>  rê
  r¿   s     r6   rü   Úgibrat_gen._logpdfŠ  s   € Ü˜q #Ó&Ð&r8   c                 ó@   • [        [        R                  " U5      5      $ rO   rí
  r¿   s     r6   r{   Úgibrat_gen._cdf�  s   € ÜœŸš ›Ó#Ð#r8   c                 ó@   • [         R                  " [        U5      5      $ rO   rò
  rÉ   s     r6   r†   Úgibrat_gen._ppf�  ó   € Ü�vŠv”i “lÓ#Ð#r8   c                 ó@   • [        [        R                  " U5      5      $ rO   r÷
  r¿   s     r6   r€   Úgibrat_gen._sf“  s   € ÜœŸš˜q›	Ó"Ð"r8   c                 ó@   • [         R                  " [        U5      5      $ rO   rü
  r¸  s     r6   rŠ   Úgibrat_gen._isf–  r,  r8   c                 óÔ   • [         R                  n[         R                  " U5      nXS-
  -  n[         R                  " US-
  5      SU-   -  n[         R                  " / SQU5      nX#XE4$ rÿ
  )rQ   Úer&  r   )rE   rV  r}  r~  r  r€  s         r6   r   Úgibrat_gen._stats™  sX   € Ü�D‰DˆÜ�WŠW�Q‹ZˆØ�q‘5‰kˆÜ�WŠW�Q˜‘U‹^˜q 1™uÑ%ˆÜ�ZŠZÒ*¨AÓ.ˆØ˜ˆÐr8   c                 ó\   • S[         R                  " S[         R                  -  5      -  S-   $ rT  r  rn   s    r6   r  Úgibrat_gen._entropy¡  s#   € Ø”R—V’V˜A¤§¡™IÓ&Ñ&¨Ñ,Ð,r8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rõ   rw   rü   r{   r†   r€   rŠ   r   r  r“   r�   r8   r6   r  r  h  sF   † ñð* "×4Ñ4€Mòô:ò'ò'ò$ò$ò#ò$òõ-r8   r  Úgibratc                   óX   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rSrg)Úmaxwell_geni¨  a×  A Maxwell continuous random variable.

%(before_notes)s

Notes
-----
A special case of a `chi` distribution,  with ``df=3``, ``loc=0.0``,
and given ``scale = a``, where ``a`` is the parameter used in the
Mathworld description [1]_.

The probability density function for `maxwell` is:

.. math::

    f(x) = \sqrt{2/\pi}x^2 \exp(-x^2/2)

for :math:`x >= 0`.

%(after_notes)s

References
----------
.. [1] http://mathworld.wolfram.com/MaxwellDistribution.html

%(example)s
c                 ó   • / $ rO   r�   rn   s    r6   ro   Úmaxwell_gen._shape_infoÃ  r¼   r8   Nc                 ó*   • [         R                  SXS9$ )Nr·  r5  ©rz  r7  rò   s      r6   rõ   Úmaxwell_gen._rvsÆ  s   € Ü�w‰w�s ˆwÐAÐAr8   c                 óV   • [         U-  U-  [        R                  " U* U-  S-  5      -  $ rv  )r'   rQ   rÒ   r¿   s     r6   rw   Úmaxwell_gen._pdfÉ  s*   € ä˜qÑ  Ñ"¤2§6¢6¨1¨"¨Q©$¨s©(Ó#3Ñ3Ð3r8   c                 ó²   • [         R                  " SS9   [        S[         R                  " U5      -  -   SU-  U-  -
  sS S S 5        $ ! , (       d  f       g = f)Nrp  rq  rW   r£   )rQ   rs  r)   r  r¿   s     r6   rü   Úmaxwell_gen._logpdfÍ  s;   € ä�[Š[ Ó)Ü&¨¬2¯6ª6°!«9©Ñ4°s¸1±u¸Q±wÑ>÷ *×)×)ús   •)AÁ
Ac                 ó:   • [         R                  " SX-  S-  5      $ ©Nrg  rÑ   rU  r¿   s     r6   r{   Úmaxwell_gen._cdfÒ  s   € Ü�{Š{˜3 ¡ C¡Ó(Ð(r8   c                 ó^   • [         R                  " S[        R                  " SU5      -  5      $ rv  r^  rÉ   s     r6   r†   Úmaxwell_gen._ppfÕ  s!   € Ü�wŠw�qœŸš¨¨QÓ/Ñ/Ó0Ð0r8   c                 ó:   • [         R                  " SX-  S-  5      $ rC  rY  r¿   s     r6   r€   Úmaxwell_gen._sfØ  s   € Ü�|Š|˜C ¡ S¡Ó)Ð)r8   c                 ó^   • [         R                  " S[        R                  " SU5      -  5      $ rv  rc  rÉ   s     r6   rŠ   Úmaxwell_gen._isfÛ  s!   € Ü�wŠw�qœŸš¨¨aÓ0Ñ0Ó1Ð1r8   c                 ó’  • S[         R                  -  S-
  nS[         R                  " S[         R                  -  5      -  SS[         R                  -  -
  [         R                  " S5      SS[         R                  -  -
  -  US-  -  S[         R                  -  [         R                  -  S	[         R                  -  -   S
-
  US-  -  4$ )NrÌ  rb  rW   rÑ   é    r  rg  rÖ  é    i€  ©rQ   r  r&  ©rE   r¶  s     r6   r   Úmaxwell_gen._statsÞ  sš   € Ø”—‘‰g�a‰iˆØ”"—'’'˜#œbŸe™e™)Ó$Ñ$Ø�!”B—E‘E‘'‘	Ü—’˜“
˜B˜r¤"§%¡%™x™KÑ(¨¨c©Ñ1Ø”R—U‘U‘œ2Ÿ5™5‘ 3¤r§u¡u¡9Ñ,¨sÑ2°c¸3±hÑ>ð@ð 	@r8   c                 ój   • [         S[        R                  " S[        R                  -  5      -  -   S-
  $ rT  )r$   rQ   r  r  rn   s    r6   r  Úmaxwell_gen._entropyå  s'   € Ü˜œBŸFšF 1¤R§U¡U¡7›OÑ+Ñ+¨CÑ/Ð/r8   r�   r-  r¾
  r�   r8   r6   r8  r8  ¨  s;   † ñò4ôBò4ò?ò
)ò1ò*ò2ò@õ0r8   r8  Úmaxwellc                   ó<   • \ rS rSrSrS rS rS rS rS r	S r
S	rg
)Ú
mielke_geniì  aŠ  A Mielke Beta-Kappa / Dagum continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `mielke` is:

.. math::

    f(x, k, s) = \frac{k x^{k-1}}{(1+x^s)^{1+k/s}}

for :math:`x > 0` and :math:`k, s > 0`. The distribution is sometimes
called Dagum distribution ([2]_). It was already defined in [3]_, called
a Burr Type III distribution (`burr` with parameters ``c=s`` and
``d=k/s``).

`mielke` takes ``k`` and ``s`` as shape parameters.

%(after_notes)s

References
----------
.. [1] Mielke, P.W., 1973 "Another Family of Distributions for Describing
       and Analyzing Precipitation Data." J. Appl. Meteor., 12, 275-280
.. [2] Dagum, C., 1977 "A new model for personal income distribution."
       Economie Appliquee, 33, 327-367.
.. [3] Burr, I. W. "Cumulative frequency functions", Annals of
       Mathematical Statistics, 13(2), pp 215-232 (1942).

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ )Nrz  Fr   r3  rx  rl   )rE   ÚikÚi_ss      r6   ro   Úmielke_gen._shape_info  ó:   € Ü˜˜U Q¬¯© K°Ó@ˆÜ˜˜e a¬¯© [°.ÓAˆØˆyÐr8   c                 ó>   • X!US-
  -  -  SX-  -   SUS-  U-  -   -  -  $ r>  r�   ©rE   rv   rz  rx  s       r6   rw   Úmielke_gen._pdf  s.   € Ø�Q�s‘U‘‰|˜s 1¡4™x¨3¨q°©u°Q©w©;Ñ7Ñ7Ð7r8   c                 ó  • [         R                  " SS9   [         R                  " U5      [         R                  " U5      US-
  -  -   [         R                  " X-  5      SX#-  -   -  -
  sS S S 5        $ ! , (       d  f       g = f)Nrp  rq  r   )rQ   rs  r  rï  r\  s       r6   rü   Úmielke_gen._logpdf  sU   € ä�[Š[ Ó)Ü—6’6˜!“9œrŸvšv a›y¨!¨a©%Ñ0Ñ0´2·8²8¸A¹D³>À1ÀqÁsÁ7Ñ3KÑK÷ *×)×)ús   •AA3Á3
Bc                 ó,   • X-  SX-  -   US-  U-  -  -  $ r>  r�   r\  s       r6   r{   Úmielke_gen._cdf  s"   € Ø‰t�s˜1™4‘x 1 S¡5¨¡7Ñ+Ñ+Ð+r8   c                 óN   • [        XS-  U-  5      n[        USU-
  -  SU-  5      $ r>  rW  )rE   r…   rz  rx  Úqsks        r6   r†   Úmielke_gen._ppf  s,   € Ü�!�s‘U˜1‘W‹oˆÜ�3˜˜C™‘= # a¡%Ó(Ð(r8   c                 óZ   • S n[         R                  " X:  XU4U[        R                  S9$ )Nc                 ó¢   • [         R                  " X-   U-  5      [         R                  " SX-  -
  5      -  [         R                  " X-  5      -  $ ra   r@  )re   rz  rx  s      r6   rš	  Ú$mielke_gen._munp.<locals>.nth_moment#  s9   € ä—8’8˜Q™S !™GÓ$¤R§X¢X¨a°±©e£_Ñ4´R·X²X¸a¹c³]ÑBÐBr8   r  rc  )rE   re   rz  rx  rš	  s        r6   r+  Úmielke_gen._munp"  s)   € ò	Cô �Š˜q™u q¨Q i°ÌÏÉÑOÐOr8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r+  r“   r�   r8   r6   rU  rU  ì  s(   † ñ òBò
8òLò
,ò)õPr8   rU  Úmielkec                   óZ   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rS rSrg)Ú
kappa4_geni-  a¤  Kappa 4 parameter distribution.

%(before_notes)s

Notes
-----
The probability density function for kappa4 is:

.. math::

    f(x, h, k) = (1 - k x)^{1/k - 1} (1 - h (1 - k x)^{1/k})^{1/h-1}

if :math:`h` and :math:`k` are not equal to 0.

If :math:`h` or :math:`k` are zero then the pdf can be simplified:

:math:`h = 0` and :math:`k \neq 0`::

    kappa4.pdf(x, h, k) = (1.0 - k*x)**(1.0/k - 1.0)*
                          exp(-(1.0 - k*x)**(1.0/k))

:math:`h \neq 0` and :math:`k = 0`::

    kappa4.pdf(x, h, k) = exp(-x)*(1.0 - h*exp(-x))**(1.0/h - 1.0)

:math:`h = 0` and :math:`k = 0`::

    kappa4.pdf(x, h, k) = exp(-x)*exp(-exp(-x))

kappa4 takes :math:`h` and :math:`k` as shape parameters.

The kappa4 distribution returns other distributions when certain
:math:`h` and :math:`k` values are used.

+------+-------------+----------------+------------------+
| h    | k=0.0       | k=1.0          | -inf<=k<=inf     |
+======+=============+================+==================+
| -1.0 | Logistic    |                | Generalized      |
|      |             |                | Logistic(1)      |
|      |             |                |                  |
|      | logistic(x) |                |                  |
+------+-------------+----------------+------------------+
|  0.0 | Gumbel      | Reverse        | Generalized      |
|      |             | Exponential(2) | Extreme Value    |
|      |             |                |                  |
|      | gumbel_r(x) |                | genextreme(x, k) |
+------+-------------+----------------+------------------+
|  1.0 | Exponential | Uniform        | Generalized      |
|      |             |                | Pareto           |
|      |             |                |                  |
|      | expon(x)    | uniform(x)     | genpareto(x, -k) |
+------+-------------+----------------+------------------+

(1) There are at least five generalized logistic distributions.
    Four are described here:
    https://en.wikipedia.org/wiki/Generalized_logistic_distribution
    The "fifth" one is the one kappa4 should match which currently
    isn't implemented in scipy:
    https://en.wikipedia.org/wiki/Talk:Generalized_logistic_distribution
    https://www.mathwave.com/help/easyfit/html/analyses/distributions/gen_logistic.html
(2) This distribution is currently not in scipy.

References
----------
J.C. Finney, "Optimization of a Skewed Logistic Distribution With Respect
to the Kolmogorov-Smirnov Test", A Dissertation Submitted to the Graduate
Faculty of the Louisiana State University and Agricultural and Mechanical
College, (August, 2004),
https://digitalcommons.lsu.edu/gradschool_dissertations/3672

J.R.M. Hosking, "The four-parameter kappa distribution". IBM J. Res.
Develop. 38 (3), 25 1-258 (1994).

B. Kumphon, A. Kaew-Man, P. Seenoi, "A Rainfall Distribution for the Lampao
Site in the Chi River Basin, Thailand", Journal of Water Resource and
Protection, vol. 4, 866-869, (2012).
:doi:`10.4236/jwarp.2012.410101`

C. Winchester, "On Estimation of the Four-Parameter Kappa Distribution", A
Thesis Submitted to Dalhousie University, Halifax, Nova Scotia, (March
2000).
http://www.nlc-bnc.ca/obj/s4/f2/dsk2/ftp01/MQ57336.pdf

%(after_notes)s

%(example)s

c                 ór   • [         R                  " X5      S   R                  n[         R                  " USS9$ )Nr   Tr  )rQ   rS  rj  Úfull)rE   rž  rz  rj  s       r6   rf   Úkappa4_gen._argcheck†  s.   € Ü×#Ò# AÓ)¨!Ñ,×2Ñ2ˆÜ�wŠw�u¨Ñ.Ð.r8   c                 ó¼   • [        SS[        R                  * [        R                  4S5      n[        SS[        R                  * [        R                  4S5      nX/$ )Nrž  Fr3  rz  rl   )rE   ÚihrW  s      r6   ro   Úkappa4_gen._shape_infoŠ  sG   € Ü˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆÜ˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆØˆxˆr8   c           
      óø  • [         R                  " US:„  US:„  5      [         R                  " US:„  US:H  5      [         R                  " US:„  US:  5      [         R                  " US:*  US:„  5      [         R                  " US:*  US:H  5      [         R                  " US:*  US:  5      /nS nS nS nS n[        UXEXFXg/X/[         R                  S9nS nS n[        UXEXTXU/X/[         R                  S9n	X‰4$ )	Nr   c                 ó<   • S[         R                  " X* 5      -
  U-  $ r>  )rQ   r^  ©rž  rz  s     r6   râ  Ú#kappa4_gen._get_support.<locals>.f0—  s   € Øœ"Ÿ.š.¨¨BÓ/Ñ/°Ñ2Ð2r8   c                 ó.   • [         R                  " U 5      $ rO   rg  rt  s     r6   rå  Ú#kappa4_gen._get_support.<locals>.f1š  s   € Ü—6’6˜!“9Ðr8   c                 ó‚   • [         R                  " [         R                  " U 5      5      n[         R                  * US S & U$ rO   ©rQ   rú  rj  rm   ©rž  rz  r—   s      r6   Úf3Ú#kappa4_gen._get_support.<locals>.f3�  s,   € Ü—’œŸš !›Ó%ˆAÜ—F‘F�7ˆA‰aˆDØˆHr8   c                 ó   • SU-  $ r>  r�   rt  s     r6   Úf5Ú#kappa4_gen._get_support.<locals>.f5¢  ó   € Ø�q‘5ˆLr8   ©Údefaultc                 ó   • SU-  $ r>  r�   rt  s     r6   râ  ru  ª  r€  r8   c                 ó€   • [         R                  " [         R                  " U 5      5      n[         R                  US S & U$ rO   ry  rz  s      r6   rå  rw  ­  s*   € Ü—’œŸš !›Ó%ˆAÜ—6‘6ˆA‰aˆDØˆHr8   ©rQ   r)  r   rF  )
rE   rž  rz  Úcondlistrâ  rå  r{  r~  rA  r@  s
             r6   r¥   Úkappa4_gen._get_support�  sü   € Ü—N’N 1 q¡5¨!¨a©%Ó0Ü—N’N 1 q¡5¨!¨q©&Ó1Ü—N’N 1 q¡5¨!¨a©%Ó0Ü—N’N 1¨¡6¨1¨q©5Ó1Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1¨q©5Ó1ð3ˆò	3ò	ò	ò
	ô ˜Ø "¨"Ð1Ø˜Ü!#§¡ñ)ˆò
	ò	ô
 ˜Ø "¨"Ð1Ø˜Ü!#§¡ñ)ˆð ˆvˆr8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  ©rE   rv   rž  rz  s       r6   rw   Úkappa4_gen._pdf¸  r›  r8   c                 ó:  • [         R                  " US:g  US:g  5      [         R                  " US:H  US:g  5      [         R                  " US:g  US:H  5      [         R                  " US:H  US:H  5      /nS nS nS nS n[        UXVXx/XU/[         R                  S9$ )Nr   c                 óž   • [         R                  " SU-  S-
  U* U -  5      [         R                  " SU-  S-
  U* SX -  -
  SU-  -  -  5      -   $ )zbpdf = (1.0 - k*x)**(1.0/k - 1.0)*(
       1.0 - h*(1.0 - k*x)**(1.0/k))**(1.0/h-1.0)
logpdf = ...
r•   râ  ©rv   rž  rz  s      r6   râ  Úkappa4_gen._logpdf.<locals>.f0Ã  sX   € ô
 —J’J˜s 1™u s™{¨Q¨B¨q©DÓ1Ü—J’J˜s 1™u s™{¨Q¨B°°a±c±	¸SÀ¹UÑ/CÑ,CÓDñEð Fr8   c                 ó`   • [         R                  " SU-  S-
  U* U -  5      SX -  -
  SU-  -  -
  $ )zTpdf = (1.0 - k*x)**(1.0/k - 1.0)*np.exp(-(
       1.0 - k*x)**(1.0/k))
logpdf = ...
r•   râ  r�  s      r6   rå  Úkappa4_gen._logpdf.<locals>.f1Ë  s7   € ô
 —:’:˜c !™e c™k¨A¨2¨a©4Ó0°C¸!¹#±IÀÀQÁÑ3GÑGÐGr8   c                 óv   • U * [         R                  " SU-  S-
  U* [        R                  " U * 5      -  5      -   $ )zBpdf = np.exp(-x)*(1.0 - h*np.exp(-x))**(1.0/h - 1.0)
logpdf = ...
r•   )r~   r¸  rQ   rÒ   r�  s      r6   Úf2Úkappa4_gen._logpdf.<locals>.f2Ò  s4   € ð �2œŸ
š
 3 q¡5¨3¡;°°´2·6²6¸1¸"³:±Ó>Ñ>Ð>r8   c                 ó8   • U * [         R                  " U * 5      -
  $ )z)pdf = np.exp(-x-np.exp(-x))
logpdf = ...
rP  r�  s      r6   r{  Úkappa4_gen._logpdf.<locals>.f3Ø  s   € ð �2œŸš ˜r›
‘?Ð"r8   r�  r…  ©	rE   rv   rž  rz  r†  râ  rå  r’  r{  s	            r6   rü   Úkappa4_gen._logpdf½  sž   € Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2ð4ˆò
	Fò	Hò	?ò	#ô ˜8Ø BÐ+Ø !˜9Ü#%§6¡6ñ+ð 	+r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r  r‰  s       r6   r{   Úkappa4_gen._cdfã  rî  r8   c                 ó:  • [         R                  " US:g  US:g  5      [         R                  " US:H  US:g  5      [         R                  " US:g  US:H  5      [         R                  " US:H  US:H  5      /nS nS nS nS n[        UXVXx/XU/[         R                  S9$ )Nr   c                 óX   • SU-  [         R                  " U* SX -  -
  SU-  -  -  5      -  $ )z;cdf = (1.0 - h*(1.0 - k*x)**(1.0/k))**(1.0/h)
logcdf = ...
r•   rm  r�  s      r6   râ  Úkappa4_gen._logcdf.<locals>.f0ì  s2   € ð ˜‘Eœ2Ÿ8š8 Q B¨¨a©c©	°S¸±UÑ';Ñ$;Ó<Ñ<Ð<r8   c                 ó   • SX -  -
  SU-  -  * $ )z1cdf = np.exp(-(1.0 - k*x)**(1.0/k))
logcdf = ...
r•   r�   r�  s      r6   rå  Úkappa4_gen._logcdf.<locals>.f1ò  s   € ð ˜1™3‘Y # a¡%Ñ(Ð(Ð(r8   c                 ól   • SU-  [         R                  " U* [        R                  " U * 5      -  5      -  $ )z1cdf = (1.0 - h*np.exp(-x))**(1.0/h)
logcdf = ...
r•   )r~   rï  rQ   rÒ   r�  s      r6   r’  Úkappa4_gen._logcdf.<locals>.f2ø  s,   € ð ˜‘Eœ2Ÿ8š8 Q B¤r§v¢v¨q¨b£z¡MÓ2Ñ2Ð2r8   c                 ó2   • [         R                  " U * 5      * $ )z'cdf = np.exp(-np.exp(-x))
logcdf = ...
rP  r�  s      r6   r{  Úkappa4_gen._logcdf.<locals>.f3þ  s   € ô —F’F˜A˜2“J�;Ðr8   r�  r…  r–  s	            r6   r  Úkappa4_gen._logcdfæ  sœ   € Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2ð4ˆò
	=ò	)ò	3ò	ô ˜8Ø BÐ+Ø !˜9Ü#%§6¡6ñ+ð 	+r8   c                 ó:  • [         R                  " US:g  US:g  5      [         R                  " US:H  US:g  5      [         R                  " US:g  US:H  5      [         R                  " US:H  US:H  5      /nS nS nS nS n[        UXVXx/XU/[         R                  S9$ )Nr   c                 ó.   • SU-  SSX-  -
  U-  U-  -
  -  $ r>  r�   ©r…   rž  rz  s      r6   râ  Úkappa4_gen._ppf.<locals>.f0  s&   € Ø�q‘5˜# #¨©¡,°Ñ!1°AÑ 5Ñ5Ñ6Ð6r8   c                 óH   • SU-  S[         R                  " U 5      * U-  -
  -  $ r>  rg  r¦  s      r6   rå  Úkappa4_gen._ppf.<locals>.f1  s$   € Ø�q‘5˜#¤"§&¢&¨£) ¨a¡Ñ/Ñ0Ð0r8   c                 ód   • [         R                  " X-  * 5      * [        R                  " U5      -   $ )z,ppf = -np.log((1.0 - (q**h))/h)
            r¿  r¦  s      r6   r’  Úkappa4_gen._ppf.<locals>.f2  s'   € ô —H’H˜q™t˜WÓ%Ð%¬¯ª¨q«	Ñ1Ð1r8   c                 óZ   • [         R                  " [         R                  " U 5      * 5      * $ rO   rg  r¦  s      r6   r{  Úkappa4_gen._ppf.<locals>.f3  s   € Ü—F’FœBŸFšF 1›I˜:Ó&Ð&Ð&r8   r�  r…  )	rE   r…   rž  rz  r†  râ  rå  r’  r{  s	            r6   r†   Úkappa4_gen._ppf	  sœ   € Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2Ü—N’N 1¨¡6¨1°©6Ó2ð4ˆò
	7ò	1ò	2ò
	'ô ˜8Ø BÐ+Ø !˜9Ü#%§6¡6ñ+ð 	+r8   c                 ón   • [         R                  " US:  US:¬  5      US:  /nS nS n[        X4U/X/SS9$ )Nr   c                 ó8   • SU -  U-  R                  [        5      $ r±  ©Úastyper*  rt  s     r6   râ  Ú&kappa4_gen._get_stats_info.<locals>.f0(  s   € Ø˜‘F˜1‘H×$Ñ$¤SÓ)Ð)r8   c                 ó2   • SU-  R                  [        5      $ r±  r±  rt  s     r6   rå  Ú&kappa4_gen._get_stats_info.<locals>.f1+  s   € Ø˜‘F—?‘?¤3Ó'Ð'r8   r¶  r�  )rQ   r)  r   )rE   rž  rz  r†  râ  rå  s         r6   Ú_get_stats_infoÚkappa4_gen._get_stats_info"  sG   € ä�NŠN˜1˜q™5 ! q¡&Ó)Ø�‰Eð
ˆò
	*ò	(ô ˜8¨" X°¨v¸qÑAÐAr8   c                 óÊ   • U R                  X5      n[        SS5       Vs/ s H2  n[        R                  " XC:  5      (       a  S O[        R                  PM4     nnUS S  $ s  snf ©Nr   r¶  )r¶  r`  rQ   rì  rF  )rE   rž  rz  ÚmaxrrW  Úoutputss         r6   r   Úkappa4_gen._stats0  sU   € Ø×#Ñ# AÓ)ˆÜAFÀqÈ!ÄÓMÂ¸Aœ2Ÿ6š6 !¡(×+Ñ+‘4´·±Ò7ÁˆÐMØ‘qˆzÐùò Ns    9A c                 ó¬   • U R                  US   US   5      nX:¼  a  [        R                  $ [        R                  " U R
                  SSU4U-   S9S   $ ©Nr   r   r‰  )r¶  rQ   rF  r   rO  Ú_mom_integ1)rE   r  rG   rº  s       r6   Ú_mom1_scÚkappa4_gen._mom1_sc5  sP   € Ø×#Ñ# D¨¡G¨T°!©WÓ5ˆØ‹9Ü—6‘6ˆMÜ�~Š~˜d×.Ñ.°°1¸A¸4À¹9ÑEÀaÑHÐHr8   r�   N)rŽ   r�   r�   r‘   r’   rf   ro   r¥   rw   rü   r{   r  r†   r¶  r   rÀ  r“   r�   r8   r6   rk  rk  -  sE   † ñWòp/òò
'òR-ò
$+òL-ò!+òF+ò2Bòõ
Ir8   rk  Úkappa4c                   óV   ^ • \ rS rSrSrS rS rS rU 4S jrS r	S r
S	 rS
 rSrU =r$ )Ú
kappa3_geni?  aÚ  Kappa 3 parameter distribution.

%(before_notes)s

Notes
-----
The probability density function for `kappa3` is:

.. math::

    f(x, a) = a (a + x^a)^{-(a + 1)/a}

for :math:`x > 0` and :math:`a > 0`.

`kappa3` takes ``a`` as a shape parameter for :math:`a`.

References
----------
P.W. Mielke and E.S. Johnson, "Three-Parameter Kappa Distribution Maximum
Likelihood and Likelihood Ratio Tests", Methods in Weather Research,
701-707, (September, 1973),
:doi:`10.1175/1520-0493(1973)101<0701:TKDMLE>2.3.CO;2`

B. Kumphon, "Maximum Entropy and Maximum Likelihood Estimation for the
Three-Parameter Kappa Distribution", Open Journal of Statistics, vol 2,
415-419 (2012), :doi:`10.4236/ojs.2012.24050`

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r2  rl   rn   s    r6   ro   Úkappa3_gen._shape_info`  r5  r8   c                 ó&   • X"X-  -   SU-  S-
  -  -  $ r¬  r�   r8  s      r6   rw   Úkappa3_gen._pdfc  s   € à�a‘d‘(˜d 1™f Q™hÑ'Ñ'Ð'r8   c                 ó    • XX-  -   SU-  -  -  $ r±  r�   r8  s      r6   r{   Úkappa3_gen._cdfg  s   € Ø�a‘d‘(˜d 1™fÑ%Ñ%Ð%r8   c           	      ó   >• [         R                  " X5      u  p[        TU ]  X5      nSnX4:  n[        R
                  " [        R                  " SX%   -  X%   X   X%   * -  -  5      5      * nXd:„  nX5   U   Xg'   XcU'   U$ )Ng{®Gáz„?r­  )rQ   rS  rA   r€   r~   rt  r¸  )	rE   rv   r—   ÚsfÚcutoffra  Úsf2Úi2rÞ  s	           €r6   r€   Úkappa3_gen._sfj  s„   ø€ Ü×"Ò" 1Ó(‰ˆÜ‰W‰[˜Óˆð
 ˆØ‰KˆÜ�xŠxœŸ
š
 4¨!©$¡;°±°q±t¸a¹d¸U±{Ñ0BÓCÓDÐDˆØ‰\ˆØ‘%˜‘)ˆ‰àˆ1‰Øˆ	r8   c                 ó$   • X!U* -  S-
  -  SU-  -  $ r>  r�   rA  s      r6   r†   Úkappa3_gen._ppfz  s   € Ø�q�b‘5˜3‘;‘ 3 q¡5Ñ)Ð)r8   c                 ót   • [         R                  " U* U* 5      n[         R                  " U5      nX$-  SU-  -  $ r>  r²  )rE   r…   r—   Úlgr7	  s        r6   rŠ   Úkappa3_gen._isf}  s4   € Ü�ZŠZ˜˜˜Q˜BÓˆÜ—’˜“ˆØ‘	˜S 1™WÑ%Ð%r8   c                 ó¨   • [        SS5       Vs/ s H2  n[        R                  " X!:  5      (       a  S O[        R                  PM4     nnUS S  $ s  snf r¹  )r`  rQ   rì  rF  )rE   r—   ra  r»  s       r6   r   Úkappa3_gen._stats‚  sC   € Ü>CÀAÀq¼kÓJºk¸œ2Ÿ6š6 !¡%Ÿ=™=‘4¬b¯f©fÒ4¹kˆÐJØ‘qˆzÐùò Ks   �9Ac                 ó²   • [         R                  " XS   :¬  5      (       a  [         R                  $ [        R                  " U R
                  SSU4U-   S9S   $ r¾  )rQ   rì  rF  r   rO  r¿  )rE   r  rG   s      r6   rÀ  Úkappa3_gen._mom1_sc†  sF   € Ü�6Š6�!˜A‘w‘,×ÑÜ—6‘6ˆMÜ�~Š~˜d×.Ñ.°°1¸A¸4À¹9ÑEÀaÑHÐHr8   r�   )rŽ   r�   r�   r‘   r’   ro   rw   r{   r€   r†   rŠ   r   rÀ  r“   r-  r.  s   @r6   rÄ  rÄ  ?  s9   ø† ñò@Eò(ò&õò *ò&ò
÷Ið Ir8   rÄ  Úkappa3c                   óL   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rSrg)Ú	moyal_geni�  aS  A Moyal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `moyal` is:

.. math::

    f(x) = \exp(-(x + \exp(-x))/2) / \sqrt{2\pi}

for a real number :math:`x`.

%(after_notes)s

This distribution has utility in high-energy physics and radiation
detection. It describes the energy loss of a charged relativistic
particle due to ionization of the medium [1]_. It also provides an
approximation for the Landau distribution. For an in depth description
see [2]_. For additional description, see [3]_.

References
----------
.. [1] J.E. Moyal, "XXX. Theory of ionization fluctuations",
       The London, Edinburgh, and Dublin Philosophical Magazine
       and Journal of Science, vol 46, 263-280, (1955).
       :doi:`10.1080/14786440308521076` (gated)
.. [2] G. Cordeiro et al., "The beta Moyal: A useful skew distribution",
       International Journal of Research and Reviews in Applied Sciences,
       vol 10, 171-192, (2012).
       https://www.arpapress.com/files/volumes/vol10issue2/ijrras_10_2_02.pdf
.. [3] C. Walck, "Handbook on Statistical Distributions for
       Experimentalists; International Report SUF-PFY/96-01", Chapter 26,
       University of Stockholm: Stockholm, Sweden, (2007).
       http://www.stat.rice.edu/~dobelman/textfiles/DistributionsHandbook.pdf

.. versionadded:: 1.1.0

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úmoyal_gen._shape_infoº  r¼   r8   Nc                 ó\   • [         R                  SSUUS9n[        R                  " U5      * $ )Nr£   rW   )r—   r/   ró   rô   )r6  r7  rQ   r  )rE   ró   rô   r8  s       r6   rõ   Úmoyal_gen._rvs½  s.   € Ü�Y‰Y˜ A¨DØ$0ð ð 2ˆä—’�r“
ˆ{Ðr8   c                 ó´   • [         R                  " SU[         R                  " U* 5      -   -  5      [         R                  " S[         R                  -  5      -  $ ©Nr@  rW   )rQ   rÒ   r&  r  r¿   s     r6   rw   Úmoyal_gen._pdfÂ  s:   € Ü�vŠv�d˜a¤"§&¢&¨!¨£*™nÑ-Ó.´·²¸¼2¿5¹5¹Ó1AÑAÐAr8   c                 óŠ   • [         R                  " [        R                  " SU-  5      [        R                  " S5      -  5      $ râ  )r~   rC
  rQ   rÒ   r&  r¿   s     r6   r{   Úmoyal_gen._cdfÅ  s+   € Ü�wŠw”r—v’v˜d Q™hÓ'¬"¯'ª'°!«*Ñ4Ó5Ð5r8   c                 óŠ   • [         R                  " [        R                  " SU-  5      [        R                  " S5      -  5      $ râ  )r~   r:  rQ   rÒ   r&  r¿   s     r6   r€   Úmoyal_gen._sfÈ  s+   € Ü�vŠv”b—f’f˜T A™XÓ&¬¯ª°«Ñ3Ó4Ð4r8   c                 ód   • [         R                  " S[        R                  " U5      S-  -  5      * $ rD  )rQ   r  r~   Úerfcinvr¿   s     r6   r†   Úmoyal_gen._ppfË  s&   € Ü—’�qœ2Ÿ:š: a›=¨!Ñ+Ñ+Ó,Ð,Ð,r8   c                 ó  • [         R                  " S5      [         R                  -   n[         R                  S-  S-  nS[         R                  " S5      -  [
        R                  " S5      -  [         R                  S-  -  nSnXX44$ )NrW   é   rÌ  r¾  )rQ   r  Úeuler_gammar  r&  r~   r×  r|  s        r6   r   Úmoyal_gen._statsÎ  sc   € Ü�VŠV�A‹YœŸ™Ñ'ˆÜ�e‰e�Q‰h˜‰lˆØ”"—'’'˜!“*‰_œrŸwšw q›zÑ)¬B¯E©E°1©HÑ4ˆØˆØ˜ˆÐr8   c                 óÒ  • US:X  a'  [         R                  " S5      [         R                  -   $ US:X  aA  [         R                  S-  S-  [         R                  " S5      [         R                  -   S-  -   $ US:X  aˆ  S[         R                  S-  -  [         R                  " S5      [         R                  -   -  n[         R                  " S5      [         R                  -   S-  nS[        R
                  " S5      -  nX#-   U-   $ US:X  aÏ  S	[        R
                  " S5      -  [         R                  " S5      [         R                  -   -  nS[         R                  S-  -  [         R                  " S5      [         R                  -   S-  -  n[         R                  " S5      [         R                  -   S
-  nS[         R                  S
-  -  S
-  nX#-   U-   U-   $ U R                  U5      $ )Nr•   rW   rÑ   r·  rg  rÌ  r|  r¾  é8   rU  r  )rQ   r  rí  r  r~   r×  rÀ  )rE   re   Útmp1r  Útmp3Útmp4s         r6   r+  Úmoyal_gen._munpÕ  sj  € Ø�‹8Ü—6’6˜!“9œrŸ~™~Ñ-Ð-Ø�#‹XÜ—5‘5˜!‘8˜a‘<¤2§6¢6¨!£9¬r¯~©~Ñ#=ÀÑ"AÑAÐAØ�#‹XØœŸ™ ™‘>¤R§V¢V¨A£Y¬r¯~©~Ñ%=Ñ>ˆDÜ—F’F˜1“IœbŸn™nÑ,¨qÑ0ˆDØœŸš ›
‘?ˆDØ‘; Ñ%Ð%Ø�#‹XØœBŸGšG A›JÑ&¬"¯&ª&°«)´b·n±nÑ*DÑEˆDØ”r—u‘u˜a‘x‘<¤2§6¢6¨!£9¬r¯~©~Ñ#=ÀÑ"AÑAˆDÜ—F’F˜1“I¤§¡Ñ.°Ñ2ˆDØ”r—u‘u˜a‘x‘< !Ñ#ˆDØ‘; Ñ%¨Ñ,Ð,ð —=‘= Ó#Ð#r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   r{   r€   r†   r   r+  r“   r�   r8   r6   rÜ  rÜ  �  s1   † ñ)òTôò
Bò6ò5ò-òõ$r8   rÜ  Úmoyalc                   óh   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rSS jrSS jrSrg)Únakagami_geniî  a  A Nakagami continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `nakagami` is:

.. math::

    f(x, \nu) = \frac{2 \nu^\nu}{\Gamma(\nu)} x^{2\nu-1} \exp(-\nu x^2)

for :math:`x >= 0`, :math:`\nu > 0`. The distribution was introduced in
[2]_, see also [1]_ for further information.

`nakagami` takes ``nu`` as a shape parameter for :math:`\nu`.

%(after_notes)s

References
----------
.. [1] "Nakagami distribution", Wikipedia
       https://en.wikipedia.org/wiki/Nakagami_distribution
.. [2] M. Nakagami, "The m-distribution - A general formula of intensity
       distribution of rapid fading", Statistical methods in radio wave
       propagation, Pergamon Press, 1960, 3-36.
       :doi:`10.1016/B978-0-08-009306-2.50005-4`

%(example)s

c                 ó   • US:„  $ rö  r�   )rE   Únus     r6   rf   Únakagami_gen._argcheck  r  r8   c                 ó@   • [        SSS[        R                  4S5      /$ )Nrù  Fr   r3  rl   rn   s    r6   ro   Únakagami_gen._shape_info  rH  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  ©rE   rv   rù  s      r6   rw   Únakagami_gen._pdf  r·  r8   c                 óÖ   • [         R                  " S5      [        R                  " X"5      -   [        R                  " U5      -
  [        R                  " SU-  S-
  U5      -   X!S-  -  -
  $ r  )rQ   r  r~   r¹  r  rþ  s      r6   rü   Únakagami_gen._logpdf  sX   € ô —’�q“	œBŸHšH RÓ,Ñ,¬r¯zªz¸"«~Ñ=Ü—’˜˜2™ ™ 1Ó%ñ&Ø(*¨a©4©ñ0ð 	1r8   c                 ó:   • [         R                  " X"U-  U-  5      $ rO   rU  rþ  s      r6   r{   Únakagami_gen._cdf  s   € Ü�{Š{˜2 !™t A™vÓ&Ð&r8   c                 ób   • [         R                  " SU-  [        R                  " X!5      -  5      $ r>  r^  )rE   r…   rù  s      r6   r†   Únakagami_gen._ppf   s#   € Ü�wŠw�s˜2‘vœbŸnšn¨RÓ3Ñ3Ó4Ð4r8   c                 ó:   • [         R                  " X"U-  U-  5      $ rO   rY  rþ  s      r6   r€   Únakagami_gen._sf#  s   € Ü�|Š|˜B 1¡ Q¡Ó'Ð'r8   c                 ób   • [         R                  " SU-  [        R                  " X!5      -  5      $ ra   rc  )rE   rV  rù  s      r6   rŠ   Únakagami_gen._isf&  s#   € Ü�wŠw�q˜‘tœbŸošo¨bÓ4Ñ4Ó5Ð5r8   c                 ó&  • [         R                  " US5      [        R                  " U5      -  nSX"-  -
  nUSSU-  U-  -
  -  S-  U-  [        R                  " US5      -  nSUS-  -  U-  SU-  S	-
  US	-  -  -   S	U-  -
  S-   nXQUS-  -  -  nX#XE4$ )
Nr£   r•   r   rU  rÑ   rg  éúÿÿÿrb  rW   )r~   rh  rQ   r&  ri  )rE   rù  r}  r~  r  r€  s         r6   r   Únakagami_gen._stats)  s¨   € Ü�WŠW�R˜ÓœbŸgšg b›kÑ)ˆØ�"‘%‰iˆØ�1�q˜‘t˜C‘x‘<Ñ  3Ñ&¨Ñ+¬b¯hªh°s¸CÓ.@Ñ@ˆØ��A‘‰X�b‰[˜A˜b™D ™F B¨¡E™>Ñ)¨!¨B©$Ñ.°Ñ2ˆØ
��c‘‰kÑˆØ˜ˆÐr8   c                 óÆ  • [         R                  " U5      n[         R                  " U5      n[        R                  " U5      nXS-
  [        R
                  " U5      -  -
  nS[         R                  " U5      -  [         R                  " S5      -
  nX4-   U-   n[        R                  R                  5       nUS:„  nXX   U-   SSX   -  -  -
  Xh'   UR                  U5      S   $ )Nr£   r@  rW   g     jè@r   r  r�   )rQ   rj  r	  r~   r  rn  r  rT  r.  r  rÂ  )	rE   rù  rj  r
  r  r.  rž  Únorm_entropyra  s	            r6   r  Únakagami_gen._entropy1  s»   € Ü—’˜“ˆä�]Š]˜2ÓˆÜ�JŠJ�r‹NˆØ�s‘(œbŸjšj¨›nÑ,Ñ,ˆØ”2—6’6˜"“:Ñ¤§¢ q£	Ñ)ˆØ‰E�A‰Iˆä—z‘z×*Ñ*Ó,ˆð �‰Hˆà‰t�lÑ" Q¨¨2©5©¡\Ñ1ˆ‰Ø�y‰y˜Ó Ñ#Ð#r8   Nc                 óN   • [         R                  " UR                  XS9U-  5      $ rù  )rQ   r&  r¦  )rE   rù  ró   rô   s       r6   rõ   Únakagami_gen._rvsB  s$   € ä�wŠw�|×2Ñ2°2Ð2ÐAÀBÑFÓGÐGr8   c                 ó  • [        U[        5      (       a  UR                  5       nUc  SU R                  -  n[        R
                  " U5      n[        R                  " [        R                  " X-
  S-  5      [        U5      -  5      nX#U4-   $ )N)r•   rW   )	r?   r*   rÛ  ÚnumargsrQ   rk  r&  rî  rí  )rE   rF   rG   r.   r/   s        r6   rÝ  Únakagami_gen._fitstartF  sp   € Ü�dœL×)Ñ)Ø—>‘>Ó#ˆDØ‰<Ø˜DŸL™LÑ(ˆDô �fŠf�T‹lˆÜ—’œŸš ¡
¨Q™Ó/´#°d³)Ñ;Ó<ˆØ˜E�lÑ"Ð"r8   r�   r-  rO   )rŽ   r�   r�   r‘   r’   rf   ro   rw   rü   r{   r†   r€   rŠ   r   r  rõ   rÝ  r“   r�   r8   r6   r÷  r÷  î  sE   † ñò>òFò+ò1ò'ò5ò(ò6òò$ô"H÷	#r8   r÷  Únakagamic                 óD  • US-  S-
  n[         R                  " U 5      [         R                  " U5      pT[        R                  " US-  X-  5      SXE-
  S-  -  -
  n[        R                  " X4U-  5      S-  n[
        R                  " US:„  Xg4S [         R                  * S9$ )NrÑ   r•   r£   rW   r   c                 ó4   • U [         R                  " U5      -   $ rO   rg  )rW  rj  s     r6   r  Ú_ncx2_log_pdf.<locals>.<lambda>b  s   € �QœŸš ›’]r8   r  )rQ   r&  r~   r¹  Úiver#  r$  rm   )rv   rF  rÅ  Údf2r%	  Únsr¾  Úcorrs           r6   Ú_ncx2_log_pdfr  V  sŽ   € ð ˆS‰&�3‰,€CÜ�WŠW�Q‹ZœŸš ›ˆÜ
�(Š(�3�s‘7˜A™DÓ
! C¨©°1©Ñ$4Ñ
4€CÜ�6Š6�#˜"‘uÓ Ñ#€Dä�?Š?Øˆq‰Ø	ˆÙ"Ü—F‘F�7ñ	ð r8   c                   óX   • \ rS rSrSrS rS rSS jrS rS r	S	 r
S
 rS rS rS rSrg)Úncx2_genif  a¯  A non-central chi-squared continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `ncx2` is:

.. math::

    f(x, k, \lambda) = \frac{1}{2} \exp(-(\lambda+x)/2)
        (x/\lambda)^{(k-2)/4}  I_{(k-2)/2}(\sqrt{\lambda x})

for :math:`x >= 0`, :math:`k > 0` and :math:`\lambda \ge 0`.
:math:`k` specifies the degrees of freedom (denoted ``df`` in the
implementation) and :math:`\lambda` is the non-centrality parameter
(denoted ``nc`` in the implementation). :math:`I_\nu` denotes the
modified Bessel function of first order of degree :math:`\nu`
(`scipy.special.iv`).

`ncx2` takes ``df`` and ``nc`` as shape parameters.

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

%(after_notes)s

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

%(example)s

c                 óF   • US:„  [         R                  " U5      -  US:¬  -  $ rö  rä  ©rE   rF  rÅ  s      r6   rf   Úncx2_gen._argcheckŠ  s"   € Ø�Q‘œ"Ÿ+š+ b›/Ñ)¨R°1©WÑ5Ð5r8   c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ )NrF  Fr   r3  rÅ  rk   rl   ©rE   ÚidfÚincs      r6   ro   Úncx2_gen._shape_info�  s:   € Ü˜˜u q¬"¯&©& k°>ÓBˆÜ˜˜u q¬"¯&©& k°=ÓAˆØˆzÐr8   Nc                 ó&   • UR                  XU5      $ rO   )Únoncentral_chisquare)rE   rF  rÅ  ró   rô   s        r6   rõ   Úncx2_gen._rvs’  s   € Ø×0Ñ0°¸Ó>Ð>r8   c                 óH   • [         R                  " US:g  XU4[        S 5      $ )Nr   c                 ó,   • [         R                  X5      $ rO   )rJ  rü   ©rv   rF  Ú_s      r6   r  Ú"ncx2_gen._logpdf.<locals>.<lambda>—  s   € ´·±¸QÔ0Cr8   )r#  r$  r  ©rE   rv   rF  rÅ  s       r6   rü   Úncx2_gen._logpdf•  s&   € Ü�Š˜r Q™w¨°¨´]ÙCóEð 	Er8   c                 óº   • [         R                  " SS9   [        R                  " US:g  XU4[        R
                  S 5      sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r   c                 ó,   • [         R                  X5      $ rO   )rJ  rw   r-  s      r6   r  Úncx2_gen._pdf.<locals>.<lambda>œ  ó   € ´D·I±I¸aÔ4Dr8   )rQ   rs  r#  r$  rs   Ú	_ncx2_pdfr0  s       r6   rw   Úncx2_gen._pdf™  ó<   € Ü�[Š[˜hÓ'Ü—?’? 2¨¡7¨Q°B¨K¼¿¹Ù#DóF÷ (×'×'úó   •-AÁ
Ac                 óº   • [         R                  " SS9   [        R                  " US:g  XU4[        R
                  S 5      sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r   c                 ó,   • [         R                  X5      $ rO   )rJ  r{   r-  s      r6   r  Úncx2_gen._cdf.<locals>.<lambda>¡  r5  r8   )rQ   rs  r#  r$  r~   Úchndtrr0  s       r6   r{   Úncx2_gen._cdfž  s<   € Ü�[Š[˜hÓ'Ü—?’? 2¨¡7¨Q°B¨K¼¿¹Ù#DóF÷ (×'×'úr9  c                 óº   • [         R                  " SS9   [        R                  " US:g  XU4[        R
                  S 5      sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r   c                 ó,   • [         R                  X5      $ rO   )rJ  r†   r-  s      r6   r  Úncx2_gen._ppf.<locals>.<lambda>¦  r5  r8   )rQ   rs  r#  r$  r~   Úchndtrix©rE   r…   rF  rÅ  s       r6   r†   Úncx2_gen._ppf£  s<   € Ü�[Š[˜hÓ'Ü—?’? 2¨¡7¨Q°B¨K¼¿¹Ù#DóF÷ (×'×'úr9  c                 óº   • [         R                  " SS9   [        R                  " US:g  XU4[        R
                  S 5      sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r   c                 ó,   • [         R                  X5      $ rO   )rJ  r€   r-  s      r6   r  Úncx2_gen._sf.<locals>.<lambda>«  s   € ´D·H±H¸Q´Or8   )rQ   rs  r#  r$  rs   Ú_ncx2_sfr0  s       r6   r€   Úncx2_gen._sf¨  s<   € Ü�[Š[˜hÓ'Ü—?’? 2¨¡7¨Q°B¨K¼¿¹Ù#CóE÷ (×'×'úr9  c                 óº   • [         R                  " SS9   [        R                  " US:g  XU4[        R
                  S 5      sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r   c                 ó,   • [         R                  X5      $ rO   )rJ  rŠ   r-  s      r6   r  Úncx2_gen._isf.<locals>.<lambda>°  r5  r8   )rQ   rs  r#  r$  rs   Ú	_ncx2_isfr0  s       r6   rŠ   Úncx2_gen._isf­  r8  r9  c                 óè   • X-   nS nSU" XS5      -  n[         R                  " S5      U" XS5      -  [         R                  " U" XS5      S-  5      -  nSU" XS5      -  U" XS5      S-  -  nUUUU4$ )Nc                 ó   • XU-  -   $ rO   r�   )rz  rQ  rj  s      r6   Ú	k_plus_clÚ"ncx2_gen._stats.<locals>.k_plus_cl´  s   € Ø˜‘s‘7ˆNr8   rÑ   r  rÌ  r–  r¾  rW   rÍ  )rE   rF  rÅ  Ú
_ncx2_meanrQ  Ú_ncx2_varianceÚ_ncx2_skewnessÚ_ncx2_kurtosis_excesss           r6   r   Úncx2_gen._stats²  s“   € Ø‘Wˆ
ò	à¡	¨"°#Ó 6Ñ6ˆÜŸ'š' #›,©°2¸1Ó)=Ñ=ÜŸ'š'¡)¨B°CÓ"8¸!Ñ";Ó<ñ=ˆà!%©	°"¸#Ó(>Ñ!>Ù!*¨2°3Ó!7¸Ñ!:ñ";Ðð ØØØ!ð	
ð 	
r8   r�   r-  )rŽ   r�   r�   r‘   r’   rf   ro   rõ   rü   rw   r{   r†   r€   rŠ   r   r“   r�   r8   r6   r  r  f  s@   † ñ"òF6òô
?òEòFò
Fò
Fò
Eò
Fõ

r8   r  Úncx2c                   óV   • \ rS rSrSrS rS rSS jrS rS r	S	 r
S
 rS rSS jrSrg)Úncf_geniÆ  a¦  A non-central F distribution continuous random variable.

%(before_notes)s

See Also
--------
scipy.stats.f : Fisher distribution

Notes
-----
The probability density function for `ncf` is:

.. math::

    f(x, n_1, n_2, \lambda) =
        \exp\left(\frac{\lambda}{2} +
                  \lambda n_1 \frac{x}{2(n_1 x + n_2)}
            \right)
        n_1^{n_1/2} n_2^{n_2/2} x^{n_1/2 - 1} \\
        (n_2 + n_1 x)^{-(n_1 + n_2)/2}
        \gamma(n_1/2) \gamma(1 + n_2/2) \\
        \frac{L^{\frac{n_1}{2}-1}_{n_2/2}
            \left(-\lambda n_1 \frac{x}{2(n_1 x + n_2)}\right)}
        {B(n_1/2, n_2/2)
            \gamma\left(\frac{n_1 + n_2}{2}\right)}

for :math:`n_1, n_2 > 0`, :math:`\lambda \ge 0`.  Here :math:`n_1` is the
degrees of freedom in the numerator, :math:`n_2` the degrees of freedom in
the denominator, :math:`\lambda` the non-centrality parameter,
:math:`\gamma` is the logarithm of the Gamma function, :math:`L_n^k` is a
generalized Laguerre polynomial and :math:`B` is the beta function.

`ncf` takes ``dfn``, ``dfd`` and ``nc`` as shape parameters. If ``nc=0``,
the distribution becomes equivalent to the Fisher distribution.

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

%(after_notes)s

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

%(example)s

c                 ó$   • US:„  US:„  -  US:¬  -  $ rö  r�   )rE   r  r  rÅ  s       r6   rf   Úncf_gen._argcheck÷  s   € Ø�a‘˜C !™GÑ$¨¨a©Ñ0Ð0r8   c                 ó¾   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      n[        SSS[        R                  4S5      nXU/$ )Nr  Fr   r3  r  rÅ  rk   rl   )rE   Úidf1Úidf2r&  s       r6   ro   Úncf_gen._shape_infoú  sU   € Ü˜% ¨¬B¯F©F¨°^ÓDˆÜ˜% ¨¬B¯F©F¨°^ÓDˆÜ˜˜u q¬"¯&©& k°=ÓAˆØ˜CÐ Ð r8   Nc                 ó&   • UR                  XX45      $ rO   )Únoncentral_f)rE   r  r  rÅ  ró   rô   s         r6   rõ   Úncf_gen._rvs   s   € Ø×(Ñ(¨°2Ó<Ð<r8   c                 ó0   • [         R                  " XX45      $ rO   )rs   Ú_ncf_pdf©rE   rv   r  r  rÅ  s        r6   rw   Úncf_gen._pdf  s   € Ü�|Š|˜A CÓ,Ð,r8   c                 ó0   • [         R                  " X#XA5      $ rO   )r~   Úncfdtrrf  s        r6   r{   Úncf_gen._cdf  s   € Ü�yŠy˜ 2Ó)Ð)r8   c                 óŽ   • [         R                  " SS9   [        R                  " X#XA5      sS S S 5        $ ! , (       d  f       g = fr°  )rQ   rs  r~   Úncfdtri)rE   r…   r  r  rÅ  s        r6   r†   Úncf_gen._ppf	  s(   € Ü�[Š[˜hÓ'Ü—:’:˜c¨Ó.÷ (×'×'úr¶  c                 ó0   • [         R                  " XX45      $ rO   )rs   Ú_ncf_sfrf  s        r6   r€   Úncf_gen._sf  s   € Ü�{Š{˜1 3Ó+Ð+r8   c                 óŽ   • [         R                  " SS9   [        R                  " XX45      sS S S 5        $ ! , (       d  f       g = fr°  )rQ   rs  rs   Ú_ncf_isfrf  s        r6   rŠ   Úncf_gen._isf  s(   € Ü�[Š[˜hÓ'Ü—<’< ¨Ó0÷ (×'×'úr¶  c                 óè   • [         R                  " XU5      n[         R                  " XU5      nSU;   a  [         R                  " XU5      OS nSU;   a  [         R                  " XU5      S-
  OS nXVXx4$ )Nrx  rz  rÌ  )rs   Ú	_ncf_meanÚ_ncf_varianceÚ_ncf_skewnessÚ_ncf_kurtosis_excess)	rE   r  r  rÅ  r}  r}  r~  r  r€  s	            r6   r   Úncf_gen._stats  sv   € Ü�]Š]˜3 RÓ(ˆÜ×Ò ¨"Ó-ˆØ03°w³ŒS×Ò˜s¨Ô,ÀDˆà!$¨£ô ×%Ò%Ø�bóØòØ59ð 	ð ˜ˆÐr8   r�   r-  r‚  ©rŽ   r�   r�   r‘   r’   rf   ro   rõ   rw   r{   r†   r€   rŠ   r   r“   r�   r8   r6   rZ  rZ  Æ  s5   † ñ/ò`1ò!ô=ò-ò*ò/ò,ò1÷r8   rZ  Úncfc                   óX   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 rS rS rS rSrg)Út_geni)  a?  A Student's t continuous random variable.

For the noncentral t distribution, see `nct`.

%(before_notes)s

See Also
--------
nct

Notes
-----
The probability density function for `t` is:

.. math::

    f(x, \nu) = \frac{\Gamma((\nu+1)/2)}
                    {\sqrt{\pi \nu} \Gamma(\nu/2)}
                (1+x^2/\nu)^{-(\nu+1)/2}

where :math:`x` is a real number and the degrees of freedom parameter
:math:`\nu` (denoted ``df`` in the implementation) satisfies
:math:`\nu > 0`. :math:`\Gamma` is the gamma function
(`scipy.special.gamma`).

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ rE  rl   rn   s    r6   ro   Út_gen._shape_infoH  rH  r8   Nc                 ó    • UR                  XS9$ rù  )Ú
standard_trK  s       r6   rõ   Ú
t_gen._rvsK  s   € Ø×&Ñ& rÐ&Ð5Ð5r8   c                 ód   ^ • [         R                  " U[        R                  :H  X4S U 4S j5      $ )Nc                 ó,   • [         R                  U 5      $ rO   )r.  rw   ©rv   rF  s     r6   r  Út_gen._pdf.<locals>.<lambda>Q  s   € œ$Ÿ)™) Aœ,r8   c                 óN   >• [         R                  " TR                  X5      5      $ rO   r<  )rv   rF  rE   s     €r6   r  r†  R  s   ø€ œ"Ÿ&š& §¡¨aÓ!4Ô5r8   rc  rN  s   `  r6   rw   Ú
t_gen._pdfN  s)   ø€ Ü�ŠØ”"—&‘&‰L˜1˜'Ù&Ü5ó7ð 	7r8   c                 ób   • S nS n[         R                  " U[        R                  :H  X4XC5      $ )Nc                 ó&  • [         R                  " [        R                  " SU-  S5      5      S[         R                  " U5      [         R                  " [         R                  5      -   -  -
  US-   S-  [         R
                  " X -  U-  5      -  -
  $ r  )rQ   r  r~   rh  r  rï  r…  s     r6   Út_logpdfÚt_gen._logpdf.<locals>.t_logpdfV  sl   € Ü—F’Fœ2Ÿ7š7 3¨¡8¨SÓ1Ó2ØœRŸVšV B›Z¬"¯&ª&´·±«-Ñ7Ñ8ñ9à˜A‘v˜q‘j¤§¢¨!©%°©(Ó!3Ñ3ñ4ð 5r8   c                 ó,   • [         R                  U 5      $ rO   )r.  rü   r…  s     r6   Únorm_logpdfÚ"t_gen._logpdf.<locals>.norm_logpdf[  s   € Ü—<‘< “?Ð"r8   rc  )rE   rv   rF  r‹  rŽ  s        r6   rü   Út_gen._logpdfT  s+   € ò	5ò
	#ô �Š˜r¤R§V¡V™|¨a¨W°kÓLÐLr8   c                 ó.   • [         R                  " X!5      $ rO   ©r~   ÚstdtrrN  s      r6   r{   Ú
t_gen._cdf`  r‰  r8   c                 ó0   • [         R                  " X!* 5      $ rO   r’  rN  s      r6   r€   Ú	t_gen._sfc  s   € Ü�xŠx˜˜BÓÐr8   c                 ó.   • [         R                  " X!5      $ rO   ©r~   Ústdtritr`  s      r6   r†   Ú
t_gen._ppff  s   € Ü�zŠz˜"Ó Ð r8   c                 ó0   • [         R                  " X!5      * $ rO   r˜  r`  s      r6   rŠ   Ú
t_gen._isfi  s   € Ü—
’
˜2Ó!Ð!Ð!r8   c                 ó
  • [         R                  " U5      n[         R                  " US:„  S[         R                  5      nUS:„  US:*  -  US:„  [         R                  " U5      -  U4nS S S 4n[        XEU4[         R                  5      n[         R                  " US:„  S[         R                  5      nUS:„  US:*  -  US:„  [         R                  " U5      -  U4nS	 S
 S 4n[        XEU4[         R                  5      nX6Xx4$ )Nr   r”   rW   c                 ó`   • [         R                  " [         R                  U R                  5      $ rO   ©rQ   Úbroadcast_torm   rj  ro  s    r6   r  Út_gen._stats.<locals>.<lambda>u  ó   € ¤§¢´·±¸¿¹Ô!Br8   c                 ó   • X S-
  -  $ rv  r�   ro  s    r6   r  r¡  v  s
   €  ¨#¡v¢r8   c                 óD   • [         R                  " SU R                  5      $ ra   ©rQ   r   rj  ro  s    r6   r  r¡  w  ó   € ¤§¢°°B·H±HÔ!=r8   rÌ  rU  c                 ó`   • [         R                  " [         R                  U R                  5      $ rO   rŸ  ro  s    r6   r  r¡    r¢  r8   c                 ó   • SU S-
  -  $ )Nrc  r¾  r�   ro  s    r6   r  r¡  €  s   €  ¨¨3©¢r8   c                 óD   • [         R                  " SU R                  5      $ rö  r¥  ro  s    r6   r  r¡  �  r¦  r8   )rQ   ÚisposinfrÃ  rm   r#  r   rF  )	rE   rF  Úinfinite_dfr}  r†  Ú
choicelistr~  r  r€  s	            r6   r   Út_gen._statsl  sû   € ä—k’k "“oˆä�XŠX�b˜1‘f˜c¤2§6¡6Ó*ˆà˜!‘V  a¡Ñ(Ø˜!‘VœrŸ{š{¨2›Ñ.Øð!ˆñ CÙ.Ù=ð?ˆ
ô ˜(°°´r·v±vÓ>ˆä�XŠX�b˜1‘f˜c¤2§6¡6Ó*ˆà˜!‘V  a¡Ñ(Ø˜!‘VœrŸ{š{¨2›Ñ.Øð!ˆñ CÙ/Ù=ð?ˆ
ô ˜°¨u´b·f±fÓ=ˆà˜ˆÐr8   c                 ó”   • U[         R                  :X  a  [        R                  5       $ S nS n[        R
                  " US:¬  XU5      $ )Nc                 ó  • U S-  nU S-   S-  nU[         R                  " U5      [         R                  " U5      -
  -  [        R                  " [        R                  " U 5      [         R
                  " US5      -  5      -   $ r†	  )r~   rn  rQ   r  r&  r­  )rF  ÚhalfÚhalf1s      r6   rù  Út_gen._entropy.<locals>.regularŠ  se   € Ø�a‘4ˆDØ˜!‘V˜Q‘JˆEØœ2Ÿ:š: eÓ,¬r¯zªz¸$Ó/?Ñ?Ñ@Ü—f’fœRŸWšW R›[¬¯ª°°sÓ);Ñ;Ó<ñ=ð >r8   c                 ó”   • [         R                  5       SU -  -   U S-  S-  -   U S-  S-  -
  U S-  S-  -
  SU S	-  -  -   U S
-  S-  -   nU$ )Nr   rþ  rU  rÿ  rË  r   rb  g333333Ó?r  r  )r.  r  )rF  rž  s     r6   r  Ú"t_gen._entropy.<locals>.asymptotic�  sg   € ô —‘“ 1 R¡4Ñ'¨2¨s©7°A©+Ñ5¸¸S¹À!¹ÑCØ˜‘G˜Q‘;ñØ!% r¨3¡w¡ñ0Ø35°s±7¸A±+ñ>ˆAàˆHr8   éd   )rQ   rm   r.  r  r#  r$  )rE   rF  rù  r  s       r6   r  Út_gen._entropy†  s<   € Ø”—‘‹<Ü—=‘=“?Ð"ò	>ò	ô �Š˜r S™y¨"¸'ÓBÐBr8   r�   r-  ry  r�   r8   r6   r}  r}  )  s<   † ñò<Fô6ò7ò
Mòò ò!ò"òõ4Cr8   r}  rÌ  c                   óV   • \ rS rSrSrS rS rSS jrS rS r	S	 r
S
 rS rSS jrSrg)Únct_geniž  aE  A non-central Student's t continuous random variable.

%(before_notes)s

Notes
-----
If :math:`Y` is a standard normal random variable and :math:`V` is
an independent chi-square random variable (`chi2`) with :math:`k` degrees
of freedom, then

.. math::

    X = \frac{Y + c}{\sqrt{V/k}}

has a non-central Student's t distribution on the real line.
The degrees of freedom parameter :math:`k` (denoted ``df`` in the
implementation) satisfies :math:`k > 0` and the noncentrality parameter
:math:`c` (denoted ``nc`` in the implementation) is a real number.

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

%(after_notes)s

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

%(example)s

c                 ó   • US:„  X":H  -  $ rö  r�   r!  s      r6   rf   Únct_gen._argcheck¿  s   € Ø�Q‘˜2™8Ñ$Ð$r8   c                 óž   • [        SSS[        R                  4S5      n[        SS[        R                  * [        R                  4S5      nX/$ )NrF  Fr   r3  rÅ  rl   r$  s      r6   ro   Únct_gen._shape_infoÂ  sA   € Ü˜˜u q¬"¯&©& k°>ÓBˆÜ˜˜u¬¯© w´·±Ð&7¸ÓHˆØˆzÐr8   Nc                 ó²   • [         R                  X#US9n[        R                  XUS9nU[        R                  " U5      -  [        R                  " U5      -  $ )Nrñ  r5  )r.  r7  rJ  rQ   r&  )rE   rF  rÅ  ró   rô   re   rã  s          r6   rõ   Únct_gen._rvsÇ  sE   € Ü�H‰H˜°\ˆHÐBˆÜ�X‰X�b°,ˆXÐ?ˆØ”2—7’7˜2“;‰¤§¢¨£Ñ,Ð,r8   c                 ó0   • [         R                  " XU5      $ rO   )rs   Ú_nct_pdfr0  s       r6   rw   Únct_gen._pdfÌ  s   € Ü�|Š|˜A 2Ó&Ð&r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   Únctdtrr0  s       r6   r{   Únct_gen._cdfÏ  s   € Ü�yŠy˜ Ó#Ð#r8   c                 ó0   • [         R                  " X#U5      $ rO   )r~   ÚnctdtritrC  s       r6   r†   Únct_gen._ppfÒ  s   € Ü�{Š{˜2 1Ó%Ð%r8   c                 óº   • [         R                  " SS9   [         R                  " [        R                  " XU5      SS5      sS S S 5        $ ! , (       d  f       g = f)Nrp  r±  r   r   )rQ   rs  Úcliprs   Ú_nct_sfr0  s       r6   r€   Únct_gen._sfÕ  s5   € Ü�[Š[˜hÓ'Ü—7’7œ3Ÿ;š; q¨bÓ1°1°aÓ8÷ (×'×'úr9  c                 óŽ   • [         R                  " SS9   [        R                  " XU5      sS S S 5        $ ! , (       d  f       g = fr°  )rQ   rs  rs   Ú_nct_isfr0  s       r6   rŠ   Únct_gen._isfÙ  s(   € Ü�[Š[˜hÓ'Ü—<’<  rÓ*÷ (×'×'úr¶  c                 óÚ   • [         R                  " X5      n[         R                  " X5      nSU;   a  [         R                  " X5      OS nSU;   a  [         R                  " X5      OS nXEXg4$ )Nrx  rz  )rs   Ú	_nct_meanÚ_nct_varianceÚ_nct_skewnessÚ_nct_kurtosis_excess)rE   rF  rÅ  r}  r}  r~  r  r€  s           r6   r   Únct_gen._statsÝ  sZ   € Ü�]Š]˜2Ó"ˆÜ×Ò Ó'ˆØ*-°«.ŒS×Ò˜rÔ&¸dˆØ14¸³ŒS×%Ò% bÔ-ÀTˆØ˜ˆÐr8   r�   r-  r‚  rz  r�   r8   r6   r¸  r¸  ž  s5   † ñò@%òô
-ò
'ò$ò&ò9ò+÷r8   r¸  Únctc                   ó€   ^ • \ rS rSrSrS rS rS rS rS r	S r
SS	 jrS
 r\\" \5      U 4S j5       5       rSrU =r$ )Ú
pareto_geniè  a   A Pareto continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `pareto` is:

.. math::

    f(x, b) = \frac{b}{x^{b+1}}

for :math:`x \ge 1`, :math:`b > 0`.

`pareto` takes ``b`` as a shape parameter for :math:`b`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r®  rl   rn   s    r6   ro   Úpareto_gen._shape_infoþ  r5  r8   c                 ó   • X!U* S-
  -  -  $ ra   r�   r±  s      r6   rw   Úpareto_gen._pdf   s   € à˜�r˜!‘t‘9‰}Ðr8   c                 ó   • SX* -  -
  $ ra   r�   r±  s      r6   r{   Úpareto_gen._cdf   s   € Ø�1�r‘7‰{Ðr8   c                 ó&   • [        SU-
  SU-  5      $ )Nr   r­  rW  rÄ  s      r6   r†   Úpareto_gen._ppf   s   € Ü�1�Q‘3˜˜Q™ÓÐr8   c                 ó   • X* -  $ rO   r�   r±  s      r6   r€   Úpareto_gen._sf   s   € Ø�2‰wˆr8   c                 ó6   • [         R                  " USU-  5      $ r±  râ  rÄ  s      r6   rŠ   Úpareto_gen._isf   s   € Ü�xŠx˜˜4 !™8Ó$Ð$r8   c                 óœ  • Su  p4pVSU;   an  US:„  n[         R                  " Xq5      n[         R                  " [         R                  " U5      [         R                  S9n[         R
                  " X7XˆS-
  -  5        SU;   aw  US:„  n[         R                  " Xq5      n[         R                  " [         R                  " U5      [         R                  S9n[         R
                  " XGXˆS-
  -  US-
  S-  -  5        S	U;   a¨  US
:„  n[         R                  " Xq5      n[         R                  " [         R                  " U5      [         R                  S9nSUS-   -  [         R                  " US-
  5      -  US-
  [         R                  " U5      -  -  n	[         R
                  " XWU	5        SU;   aŸ  US:„  n[         R                  " Xq5      n[         R                  " [         R                  " U5      [         R                  S9nS[         R                  " / SQU5      -  [         R                  " / SQU5      -  n	[         R
                  " XgU	5        X4XV4$ )Nr  r  r   r  r•   r%  rW   rÑ   rx  rÌ  r·  rz  rU  rc  )r•   r•   r  r;  )r•   g      Àr–  r”   )	rQ   Úextractrm  rj  rm   ÚplacerF  r&  r   )
rE   r˜   r}  r}  r~  r  r€  ÚmaskÚbtrŽ  s
             r6   r   Úpareto_gen._stats   s­  € Ø0‰ˆ�Ø�'‹>Ø�q‘5ˆDÜ—’˜DÓ$ˆBÜ—’œŸš !›´·±Ñ8ˆBÜ�HŠH�R˜r¨¡V™}Ô-Ø�'‹>Ø�q‘5ˆDÜ—’˜DÓ$ˆBÜ—'’'œ"Ÿ(š( 1›+´"·&±&Ñ9ˆCÜ�HŠH�S ¨¡f¡°°C±¸!±Ñ ;Ô<Ø�'‹>Ø�q‘5ˆDÜ—’˜DÓ$ˆBÜ—’œŸš !›´·±Ñ8ˆBØ˜˜S™‘>¤B§G¢G¨B°©HÓ$5Ñ5¸"¸s¹(ÄbÇgÂgÈbÃkÑ9QÑRˆDÜ�HŠH�R˜tÔ$Ø�'‹>Ø�q‘5ˆDÜ—’˜DÓ$ˆBÜ—’œŸš !›´·±Ñ8ˆBØœŸ
š
Ò#5°rÓ:Ñ:Ü—J’JÒ5°rÓ:ñ;ˆDä�HŠH�R˜tÔ$Ø˜ˆÐr8   c                 ó@   • SSU-  -   [         R                  " U5      -
  $ rµ  rg  ©rE   r˜   s     r6   r  Úpareto_gen._entropy,   ó   € Ø�3�q‘5‰yœ2Ÿ6š6 !›9Ñ$Ð$r8   c                 óL  >^^^^^^^• [        U TX#5      nUu  mmpVUb?  [        R                  " T5      U-
  U=(       d    S:  a  [        SS[        R                  S9eTR
                  S   mUU4S jmXVs=L a  GcS  O  GOOU4S jmU4S jmUUUUU4S jmU4S	 jn[        UR                  S
S5      5      nUS-  US-  p©U" Xš5      (       dO  U	S:”  d  U
[        R                  :  a5  U	S-  n	U
S-  n
U" Xš5      (       d  U	S:”  a  M  U
[        R                  :  a  M5  [        TXš/S9nUR                  (       a†  UR                  n[        R                  " T5      U-
  nT=(       d    T" XÍ5      nXÍ-   [        R                  " T5      :  d0  [        R                  " T5      U-
  n[        R                  " US5      nXíU4$ [        TU ]4  " T40 UD6$ Uc  [        R                  " T5      U-
  nOUnU=(       d    [        R                  " T5      U-
  nT=(       d    T" XÍ5      nXíU4$ )Nr   Úparetor   rè  c                 ój   >• T[         R                  " [         R                  " TU-
  U -  5      5      -  $ rO   r  )r/   ÚlocationrF   Úndatas     €€r6   Ú	get_shapeÚ!pareto_gen.fit.<locals>.get_shape<   s+   ø€ ð œ2Ÿ6š6¤"§&¢&¨$°©/¸UÑ)BÓ"CÓDÑDÐDr8   c                 ó   >• TU -  U-  $ rO   r�   )rj  r/   rò  s     €r6   Ú	dL_dScaleÚ!pareto_gen.fit.<locals>.dL_dScaleG   s   ø€ ð ˜u‘} uÑ,Ð,r8   c                 óH   >• U S-   [         R                  " STU-
  -  5      -  $ ra   rû  )rj  rñ  rF   s     €r6   ÚdL_dLocationÚ$pareto_gen.fit.<locals>.dL_dLocationL   s&   ø€ ð  ™	¤R§V¢V¨A°¸±Ñ,AÓ%BÑBÐBr8   c                 óz   >• [         R                  " T5      U -
  nT=(       d    T" X5      nT" X!5      T" X 5      -
  $ rO   )rQ   rk  )r/   rñ  rj  rù  rö  rF   r  ró  s      €€€€€r6   rþ  Ú$pareto_gen.fit.<locals>.fun_to_solveQ   s;   ø€ ô Ÿ6š6 $›<¨%Ñ/�Ø×<¡)¨EÓ"<�Ù# EÓ4±yÀÓ7NÑNÐNr8   c                 óv   >• [         R                  " T" U 5      5      [         R                  " T" U5      5      :g  $ rO   rP   ©rS   rT   rþ  s     €r6   rU   Ú.pareto_gen.fit.<locals>.interval_contains_rootX   s/   ø€ äŸš¡¨VÓ 4Ó5ÜŸš¡¨VÓ 4Ó5ñ6ð 7r8   r/   rW   r   )rp  rQ   rk  r‡  rm   rj  r  r=   r+   r  rq  r  rA   rC   )rE   rF   rG   r5   r  r  r  rU   r½  rS   rT   r¾  r/   r.   rj  rù  rö  r  rþ  ró  rò  rÞ  s    `             @@@@@@€r6   rC   Úpareto_gen.fit/   sæ  ÿ€ ô 1°°t¸TÓHˆ
Ø%/Ñ"ˆˆf�dð Ñ¤§¢ t£¨tÑ 3°v·{ÀÓ CÜ˜x¨q¼¿¹Ñ?Ð?à—
‘
˜1‘ˆö	Eð
 ×!Ó!õ-õ
C÷
Oñ Oõ7ô   §¡¨°!Ó 4Ó5ˆKØ(¨1™_¨k¸A©o�Fñ .¨f×=Ñ=Ø ›
 f¬r¯v©v£oØ˜!‘�Ø˜!‘�ñ .¨f×=Ñ=Ø �
 f¬r¯v©v¥oô ˜l°VÐ4DÑEˆCØ�}�}ØŸ™�Ü—f’f˜T“l UÑ*�Ø×7¡)¨EÓ"7�ð ™¤r§v¢v¨d£|Ó3ÜŸFšF 4›L¨3Ñ.�EÜŸLšL¨°Ó2�EØ 5Ð(Ð(ä‘w’{ 4Ñ0¨4Ñ0Ð0Ø‰\Ü—&’&˜“, Ñ'‰CàˆCð ×,œ"Ÿ&š& ›,¨Ñ,ˆØ×/™) EÓ/ˆØ˜5Ð Ð r8   r�   r‚  )rŽ   r�   r�   r‘   r’   ro   rw   r{   r†   r€   rŠ   r   r  rL   r   r   rC   r“   r-  r.  s   @r6   r×  r×  è  sT   ø† ñò*Eòòò òò%ôò6%ð Ù˜MÓ*ôR!ó +ó öR!r8   r×  rï  c                   óT   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rSrg)Ú	lomax_geni‰   aw  A Lomax (Pareto of the second kind) continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `lomax` is:

.. math::

    f(x, c) = \frac{c}{(1+x)^{c+1}}

for :math:`x \ge 0`, :math:`c > 0`.

`lomax` takes ``c`` as a shape parameter for :math:`c`.

`lomax` is a special case of `pareto` with ``loc=-1.0``.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úlomax_gen._shape_info¡   r5  r8   c                 ó$   • US-  SU-   US-   -  -  $ r>  r�   rn  s      r6   rw   Úlomax_gen._pdf¤   s   € à�‰u�c˜!‘e˜q ™uÑ%Ñ%Ð%r8   c                 óh   • [         R                  " U5      US-   [        R                  " U5      -  -
  $ ra   rÌ  rn  s      r6   rü   Úlomax_gen._logpdf¨   s&   € Ü�vŠv�a‹y˜A˜a™C¤§¢¨!£Ñ,Ñ,Ð,r8   c                 ó`   • [         R                  " U* [         R                  " U5      -  5      * $ rO   rs  rn  s      r6   r{   Úlomax_gen._cdf«   s"   € Ü—’˜!˜œBŸHšH Q›K™Ó(Ð(Ð(r8   c                 ó^   • [         R                  " U* [        R                  " U5      -  5      $ rO   )rQ   rÒ   r~   rï  rn  s      r6   r€   Úlomax_gen._sf®   s   € Ü�vŠv�q�bœŸš !›‘nÓ%Ð%r8   c                 ó6   • U* [         R                  " U5      -  $ rO   rm  rn  s      r6   r	  Úlomax_gen._logsf±   s   € Øˆr”"—(’(˜1“+‰~Ðr8   c                 ó`   • [         R                  " [         R                  " U* 5      * U-  5      $ rO   rs  ru  s      r6   r†   Úlomax_gen._ppf´   s!   € Ü�xŠxœŸš 1 "›˜ a™Ó(Ð(r8   c                 ó   • USU-  -  S-
  $ r¬  r�   ru  s      r6   rŠ   Úlomax_gen._isf·   s   € Ø�4˜!‘8‰}˜qÑ Ð r8   c                 ó:   • [         R                  USSS9u  p#pEX#XE4$ )Nr­  rœ  )r.   r}  )rï  rT  rØ  s         r6   r   Úlomax_gen._statsº   s$   € Ü Ÿ,™, q¨d¸F˜,ÐC‰ˆ�Ø˜ˆÐr8   c                 ó@   • SSU-  -   [         R                  " U5      -
  $ rµ  rg  r	  s     r6   r  Úlomax_gen._entropy¾   s   € Ø��Q‘‰w”r—v’v˜a“yÑ Ð r8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r€   r	  r†   rŠ   r   r  r“   r�   r8   r6   r  r  ‰   s:   † ñò.Eò&ò-ò)ò&òò)ò!òõ!r8   r  Úlomaxc                   óŠ   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rSS jrS r\\" \SS9U 4S j5       5       rSrU =r$ )Úpearson3_geniÅ   a  A pearson type III continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `pearson3` is:

.. math::

    f(x, \kappa) = \frac{|\beta|}{\Gamma(\alpha)}
                   (\beta (x - \zeta))^{\alpha - 1}
                   \exp(-\beta (x - \zeta))

where:

.. math::

        \beta = \frac{2}{\kappa}

        \alpha = \beta^2 = \frac{4}{\kappa^2}

        \zeta = -\frac{\alpha}{\beta} = -\beta

:math:`\Gamma` is the gamma function (`scipy.special.gamma`).
Pass the skew :math:`\kappa` into `pearson3` as the shape parameter
``skew``.

%(after_notes)s

%(example)s

References
----------
R.W. Vogel and D.E. McMartin, "Probability Plot Goodness-of-Fit and
Skewness Estimation Procedures for the Pearson Type 3 Distribution", Water
Resources Research, Vol.27, 3149-3158 (1991).

L.R. Salvosa, "Tables of Pearson's Type III Function", Ann. Math. Statist.,
Vol.1, 191-198 (1930).

"Using Modern Computing Tools to Fit the Pearson Type III Distribution to
Aviation Loads Data", Office of Aviation Research (2003).

c                 óê   • SnSnSn[         R                  " SX5      u  panUR                  5       n[         R                  " U5      U:  nU) nSX(   U-  -  n	XI-  S-  n
X:U	-  -
  nX‘U   U-
  -  nXaXÇX‰X«4$ )Nr”   r•   g�íµ ÷Æð>rÑ   rW   )rQ   rS  rî  r=	  )rE   rv   rh  r.   r/   Únorm2pearson_transitionÚansrç  Úinvmaskr­  rK  r×  Útransxs                r6   Ú_preprocessÚpearson3_gen._preprocessó   s�   € ð
 ˆØˆð #+Ðä×*Ò*¨3°Ó8‰ˆ�Ø�h‰h‹jˆô �{Š{˜4Ó Ð#:Ñ:ˆØ�%ˆà�d‘m eÑ+Ñ,ˆØ‘ Ñ!ˆØ˜T‘\Ñ!ˆà˜7™ dÑ*Ñ+ˆØ�v W°EÐ?Ð?r8   c                 ó.   • [         R                  " U5      $ rO   rä  )rE   rh  s     r6   rf   Úpearson3_gen._argcheck!  s   € ô
 �{Š{˜4Ó Ð r8   c                 ó^   • [        SS[        R                  * [        R                  4S5      /$ )Nrh  Fr3  rl   rn   s    r6   ro   Úpearson3_gen._shape_info!  s%   € Ü˜6 5¬B¯F©F¨7´B·F±FÐ*;¸^ÓLÐMÐMr8   c                 ó&   • SnSnUnSUS-  -  nX#XE4$ )Nr”   r•   rg  rW   r�   )rE   rh  r  r%  rx  rz  s         r6   r   Úpearson3_gen._stats!  s(   € ØˆØˆØˆØ��a‘‰KˆØ�QˆzÐr8   c                 óÞ   • [         R                  " U R                  X5      5      nUR                  S:X  a  [         R                  " U5      (       a  gU$ SU[         R                  " U5      '   U$ )Nr   r”   )rQ   rÒ   rü   r•  rP  )rE   rv   rh  r  s       r6   rw   Úpearson3_gen._pdf !  sR   € ô
 �fŠf�T—\‘\ !Ó*Ó+ˆØ�8‰8�q‹=Ü�xŠx˜�}‰}ØØˆJØ ˆŒB�HŠH�S‹MÑØˆ
r8   c                 óæ   • U R                  X5      u  p1pEpgp‰[        R                  " [        X   5      5      X5'   [        R                  " [	        U5      5      [
        R                  XH5      -   X6'   U$ rO   )r  rQ   r  rÕ   r  r6  rV  )
rE   rv   rh  r  r  rç  r  r­  rK  r.  s
             r6   rü   Úpearson3_gen._logpdf-!  sa   € ð ×Ñ˜QÓ%ñ 	6ˆ�˜g¨Uô —F’Fœ9 Q¡WÓ-Ó.ˆ‰	ô —v’vœc $›iÓ(¬5¯<©<¸Ó+FÑFˆ‰Øˆ
r8   c                 ó€  • U R                  X5      u  p1pEpgp‡[        X   5      X5'   [        R                  " X&R                  5      n[        R
                  " XbS:„  5      n	X&   S:„  n
[        R                  XJ   XŠ   5      X9'   [        R
                  " XbS:  5      nX&   S:  n[        R                  XL   XŒ   5      X;'   U$ rö  )	r  rÛ   rQ   r   rj  r)  r6  r¯   rÌ  ©rE   rv   rh  r  r  rç  r  r.  rK  Ú	invmask1aÚ	invmask1bÚ	invmask2aÚ	invmask2bs                r6   r{   Úpearson3_gen._cdf<!  s´   € à×Ñ˜QÓ%ñ 	3ˆ�˜g¨%ô ˜a™gÓ&ˆ‰	ä�Š˜t§]¡]Ó3ˆÜ—N’N 7°1©HÓ5ˆ	Ø‘M AÑ%ˆ	ô Ÿ™ 6Ñ#4°eÑ6FÓGˆ‰ô —N’N 7°1©HÓ5ˆ	Ø‘M AÑ%ˆ	äŸ™ &Ñ"3°UÑ5EÓFˆ‰àˆ
r8   c                 ó€  • U R                  X5      u  p1pEpgp‡[        X   5      X5'   [        R                  " X&R                  5      n[        R
                  " XbS:„  5      n	X&   S:„  n
[        R                  XJ   XŠ   5      X9'   [        R
                  " XbS:  5      nX&   S:  n[        R                  XL   XŒ   5      X;'   U$ rö  )	r  rå   rQ   r   rj  r)  r6  rÌ  r¯   r,  s                r6   r€   Úpearson3_gen._sfT!  s°   € à×Ñ˜QÓ%ñ 	3ˆ�˜g¨%ô ˜Q™WÓ%ˆ‰	ä�Š˜t§]¡]Ó3ˆÜ—N’N 7°1©HÓ5ˆ	Ø‘M AÑ%ˆ	ÜŸ™ &Ñ"3°UÑ5EÓFˆ‰ä—N’N 7°1©HÓ5ˆ	Ø‘M AÑ%ˆ	ÜŸ™ 6Ñ#4°eÑ6FÓGˆ‰àˆ
r8   c                 ó  • [         R                  " X5      nU R                  S/U5      u  n  pVpxpšUR                  5       nUR                  U-
  nUR                  U5      XF'   UR                  Xœ5      U-  U
-   XG'   US:X  a  US   nU$ )Nr   r�   )rQ   r   r  rî  ró   rñ   r¦  )rE   rh  ró   rô   r  r.  rç  r  r­  rK  r×  ÚnsmallÚnbigs                r6   rõ   Úpearson3_gen._rvse!  s�   € Ü�Š˜tÓ*ˆà×Ñ˜a˜S $Ó'ñ 	4ˆˆQ�˜¨ð —‘“ˆØ�y‰y˜6Ñ!ˆØ ×0Ñ0°Ó8ˆ‰	Ø#×2Ñ2°5Ó?ÀÑDÀtÑKˆ‰à�2‹:Ø�a‘&ˆCØˆ
r8   c                 ó²   • U R                  X5      u  p1pEpgp‰[        X   5      X5'   X   nSXS:     -
  XS:  '   [        R                  " X�5      U-  U	-   X6'   U$ rÃ  )r  râ   r~   r_  )
rE   r…   rh  r  r.  rç  r  r­  rK  r×  s
             r6   r†   Úpearson3_gen._ppfs!  sf   € à×Ñ˜QÓ%ñ 	4ˆ�˜¨ä˜a™gÓ&ˆ‰	Ø‰JˆØ˜! 1™H™+‘oˆ�‰(‰Ü—~’~ eÓ/°Ñ4°tÑ;ˆ‰Øˆ
r8   ze        Note that method of moments (`method='MM'`) is not
        available for this distribution.

r  c                 ó€   >• UR                  SS 5      S:X  a  [        S5      e[        [        U 5      U ]  " U/UQ70 UD6$ )Nr1   ÚMMzhFit `method='MM'` is not available for the Pearson3 distribution. Please try the default `method='MLE'`.)r=   ÚNotImplementedErrorrA   rB   rC   râ  s       €r6   rC   Úpearson3_gen.fit|!  sO   ø€ ð
 �8‰8�H˜dÓ# tÓ+Ü%ð 'Dó Eð Eô œ˜d› TÒ.¨tÐC°dÒC¸dÑCÐCr8   r�   r-  )rŽ   r�   r�   r‘   r’   r  rf   ro   r   rw   rü   r{   r€   rõ   r†   rL   r	   r   rC   r“   r-  r.  s   @r6   r  r  Å   sg   ø† ñ,òZ@ò8!òNòòòòò0ô"òð Ù˜}ð 50ñ 1ôDó1ó öDr8   r  Úpearson3c                   ó’   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rU 4S jr\\" \SS9U 4S j5       5       rSrU =r$ )Úpowerlaw_geniŒ!  a  A power-function continuous random variable.

%(before_notes)s

See Also
--------
pareto

Notes
-----
The probability density function for `powerlaw` is:

.. math::

    f(x, a) = a x^{a-1}

for :math:`0 \le x \le 1`, :math:`a > 0`.

`powerlaw` takes ``a`` as a shape parameter for :math:`a`.

%(after_notes)s

For example, the support of `powerlaw` can be adjusted from the default
interval ``[0, 1]`` to the interval ``[c, c+d]`` by setting ``loc=c`` and
``scale=d``. For a power-law distribution with infinite support, see
`pareto`. For a power-law distribution described by PDF:

.. math::

    f(x; a, l, h) = \frac{a}{h^a - l^2} x^{a-1}

with :math:`a \neq 0` and :math:`0 < l < x < h`, see `truncpareto`.

`powerlaw` is a special case of `beta` with ``b=1``.

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r2  rl   rn   s    r6   ro   Úpowerlaw_gen._shape_info³!  r5  r8   c                 ó   • X!US-
  -  -  $ r>  r�   r8  s      r6   rw   Úpowerlaw_gen._pdf¶!  s   € à�Q�s‘U‘‰|Ðr8   c                 ód   • [         R                  " U5      [        R                  " US-
  U5      -   $ ra   )rQ   r  r~   r¹  r8  s      r6   rü   Úpowerlaw_gen._logpdfº!  s$   € Ü�vŠv�a‹yœ2Ÿ8š8 A¨¡E¨1Ó-Ñ-Ð-r8   c                 ó   • XS-  -  $ r>  r�   r8  s      r6   r{   Úpowerlaw_gen._cdf½!  s   € Ø�S‘5‰zÐr8   c                 ó4   • U[         R                  " U5      -  $ rO   rg  r8  s      r6   r  Úpowerlaw_gen._logcdfÀ!  ri  r8   c                 ó    • [        USU-  5      $ r>  rW  rA  s      r6   r†   Úpowerlaw_gen._ppfÃ!  s   € Ü�1�c˜!‘e‹}Ðr8   c                 ó0   • [         R                  " X5      * $ rO   )r~   rÌ  )rE   rV  r—   s      r6   r€   Úpowerlaw_gen._sfÆ!  s   € Ü—’˜“ˆÐr8   c                 ó   • X"U-   -  $ rO   r�   r¹  s      r6   r+  Úpowerlaw_gen._munpÉ!  s   € à˜‘E‰{Ðr8   c                 óÖ   • XS-   -  XS-   -  US-   S-  -  SUS-
  US-   -  -  [         R                  " US-   U-  5      -  S[         R                  " / SQU5      -  XS-   -  US-   -  -  4$ )	Nr•   rÑ   rW   rþ  r·  rË  )r   r  r  rW   rU  )rQ   r&  r   rG  s     r6   r   Úpowerlaw_gen._statsÍ!  s   € Ø˜‘W‘Ø˜‘W‘  S¡¨Q¡Ñ.Ø˜˜S™ Q¨¡WÑ-Ñ.´·²¸!¸c¹'ÀQ¹Ó1GÑGØ”B—J’Jš~¨qÓ1Ñ1°Q¸c¹'±]ÀaÈ!ÁeÑ5LÑMðOð 	Or8   c                 ó@   • SSU-  -
  [         R                  " U5      -
  $ rµ  rg  rG  s     r6   r  Úpowerlaw_gen._entropyÓ!  rí  r8   c                 ó:   >• [         TU ]  X5      US:g  US:¬  -  -  $ r#  )rA   rJ  )rE   rv   r—   rÞ  s      €r6   rJ  Úpowerlaw_gen._support_maskÖ!  s*   ø€ Ü‘Ñ% aÓ+Ø˜‘F˜q A™vÑ&ñ(ð 	)r8   a:          Notes specifically for ``powerlaw.fit``: If the location is a free
        parameter and the value returned for the shape parameter is less than
        one, the true maximum likelihood approaches infinity. This causes
        numerical difficulties, and the resulting estimates are approximate.
        

r  c                 óš  >^^^^^^^^• UR                  SS5      (       a  [        TU ]  " T/UQ70 UD6$ [        [        R
                  " T5      5      S:X  a  [        TU ]  " T/UQ70 UD6$ [        U TX#5      u  mmpETU R                  T5      4/nU R                  U0 5      S   nUbG  TR                  5       U:”  d  [        SSS5      eUb#  TR                  5       XE-   ::  d  [        SSS5      eUb8  US::  a  [        S5      eU[        R                  " T5      ::  a  Sn[        U5      eS mS	 mUb  Ub  T" TXE5      XE4$ Ub±  [        R                  " TR                  5       [        R                  * 5      n	T=(       d	    T" TX•5      n
U" X©U4T5      n[        R                  " TR                  5       U-
  [        R                  5      nT=(       d	    T" TXÅ5      nU" XÜU4T5      nX¾:  a  X©U4$ XÜU4$ Ub  T" TU5      nT=(       d	    T" TXO5      nUXO4$ UUUU4S
 jnS mS mUUUUU4S jmUUUUUU4S jmUUUUUU4S jnTb  TS::  a  U" 5       $ Tb  TS:”  a  U" 5       $ U" 5       nU R!                  UT5      nU" 5       nU R!                  UT5      nX¾::  a  US   S::  a  U$ X¾:”  a  US   S:”  a  U$ [        TU ]  " T/UQ70 UD6$ )Nrb  Fr   Úpowerlawr   zKNegative or zero `fscale` is outside the range allowed by the distribution.z0`fscale` must be greater than the range of data.c                 ó¬   • [        U 5      nU* [        R                  " [        R                  " X-
  5      5      U[        R                  " U5      -  -
  -  $ rO   )rí  rQ   rî  r  )rF   r.   r/   r	  s       r6   ró  Ú#powerlaw_gen.fit.<locals>.get_shape"  s?   € ô �D“	ˆAØ�3œ"Ÿ&š&¤§¢¨©
Ó!3Ó4°q¼¿ºÀ»±ÑFÑGÐGr8   c                 ó(   • U R                  5       U-
  $ rO   )rQ  )rF   r.   s     r6   Ú	get_scaleÚ#powerlaw_gen.fit.<locals>.get_scale%"  s   € ð —8‘8“: Ñ#Ð#r8   c                  óö  >• [         R                  " TR                  5       [         R                  * 5      n [         R                  " U 5      [         R
                  " U R                  5      R                  :  aA  [         R                  " U 5      [         R
                  " U R                  5      R                  -  n [         R                  " T" TU 5      [         R                  5      nT=(       d	    T" TX5      nX U4$ rO   )	rQ   r  rk  rm   r  r  r4	  r  rR   )r.   r/   rj  rF   r  r\  ró  s      €€€€r6   Úfit_loc_scale_w_shape_lt_1Ú4powerlaw_gen.fit.<locals>.fit_loc_scale_w_shape_lt_1L"  sž   ø€ Ü—,’,˜tŸx™x›z¬B¯F©F¨7Ó3ˆCÜ�vŠv�c‹{œRŸXšX c§i¡iÓ0×5Ñ5Ó5Ü—g’g˜c“l¤R§X¢X¨c¯i©iÓ%8×%=Ñ%=Ñ=�Ü—L’L¡¨4°Ó!5´r·v±vÓ>ˆEØ×9™i¨¨cÓ9ˆEØ˜uÐ$Ð$r8   c                 ó.   • U R                   S   * U-  U-  $ rö  )rj  )rF   rj  r/   s      r6   rö  Ú#powerlaw_gen.fit.<locals>.dL_dScale["  s   € ð —J‘J˜q‘M�> EÑ)¨EÑ1Ð1r8   c                 óD   • US-
  [         R                  " SX -
  -  5      -  $ ra   rû  )rF   rj  r.   s      r6   rù  Ú&powerlaw_gen.fit.<locals>.dL_dLocation`"  s#   € ð ˜A‘I¤§¢¨¨S©ZÑ(8Ó!9Ñ9Ð9r8   c                 ó”   >• [         R                  " T" TU 5      [         R                  * 5      nT=(       d	    T" TX5      nT" TX 5      $ rO   ©rQ   r  rm   )r.   r/   rj  rù  rF   r  r\  ró  s      €€€€€r6   ÚdL_dLocation_starÚ+powerlaw_gen.fit.<locals>.dL_dLocation_stare"  s@   ø€ ô —L’L¡¨4°Ó!5¼¿¹°wÓ?ˆEØ×9™i¨¨cÓ9ˆEÙ  eÓ1Ð1r8   c                 ó¨   >• [         R                  " T" TU 5      [         R                  * 5      nT=(       d	    T" TX5      nT" TX!5      T" TX 5      -
  $ rO   rf  )	r.   r/   rj  rù  rö  rF   r  r\  ró  s	      €€€€€€r6   rþ  Ú&powerlaw_gen.fit.<locals>.fun_to_solvel"  sQ   ø€ ô —L’L¡¨4°Ó!5¼¿¹°wÓ?ˆEØ×9™i¨¨cÓ9ˆEÙ˜d EÓ1Ù" 4¨Ó4ñ5ð 6r8   c                  óÜ  >• [         R                  " T
R                  5       [         R                  * 5      n T
R                  5       U -
  nT	" U 5      S:”  a&  T
R                  5       U-
  n US-  nT	" U 5      S:”  a  M&  U4S jnU S-
  nSnU" X05      (       dQ  U[         R                  * :w  a<  T
R                  5       U-
  nUS-  nU" X05      (       d  U[         R                  * :w  a  M<  [        R
                  " TX04S9n[         R                  " UR                  [         R                  * 5      n[         R                  " T" T
U5      [         R                  5      nT=(       d	    T" T
Xg5      nX†U4$ )Nr   rW   c                 óv   >• [         R                  " T" U 5      5      [         R                  " T" U5      5      :g  $ rO   rP   rþ  s     €r6   rU   ÚTpowerlaw_gen.fit.<locals>.fit_loc_scale_w_shape_gt_1.<locals>.interval_contains_root€"  s/   ø€ äŸš¡¨VÓ 4Ó5ÜŸ7š7¡<°Ó#7Ó8ñ9ð :r8   r   r•   r   )rQ   r  rk  rm   r   r+   rq  )rT   rW	  rU   rS   ra  rq  r.   r/   rj  rg  rF   r  rþ  r\  ró  s            €€€€€€r6   Úfit_loc_scale_w_shape_gt_1Ú4powerlaw_gen.fit.<locals>.fit_loc_scale_w_shape_gt_1t"  s3  ø€ ô —\’\ $§(¡(£*¬r¯v©v¨gÓ6ˆFð —X‘X“Z &Ñ(ˆEÙ# FÓ+¨aÓ/ØŸ™› eÑ+�Ø˜‘
�ñ $ FÓ+¨aÕ/õ:ð
 ˜a‘ZˆFð
 ˆAÙ-¨f×=Ñ=Ø¤"§&¡& Ó(ØŸ(™(›* q™.�Ø�Q‘�ñ .¨f×=Ñ=Ø¤"§&¡& Õ(ô ×'Ò'¨¸vÐ>NÑOˆDä—,’,˜tŸy™y¬2¯6©6¨'Ó2ˆCÜ—L’L¡¨4°Ó!5´r·v±vÓ>ˆEØ×9™i¨¨cÓ9ˆEØ˜uÐ$Ð$r8   )r3   rA   rC   rí  rQ   Úuniquerp  rÝ  Ú_reduce_funcrk  r‡  rQ  r!  Úptpr  rm   r  )rE   rF   rG   r5   r  r  Úpenalized_nllf_argsÚpenalized_nllfr[   Úloc_lt1Ú	shape_lt1Úll_lt1Úloc_gt1Ú	shape_gt1Úll_gt1r/   rj  r_  rn  Úfit_shape_lt1Úfit_shape_gt1rù  rg  rö  r  rþ  r\  ró  rÞ  s    `                   @@@@@@@€r6   rC   Úpowerlaw_gen.fitÚ!  s  ÿø€ ðP �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3äŒr�yŠy˜‹Ó 1Ó$Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä%@ÀÀtØAEó&MÑ"ˆˆf�dà# d§n¡n°TÓ&:Ð%<Ð=ÐØ×*Ñ*Ð+>ÀÓCÀAÑFˆð
 ÑØ—8‘8“: Ó$Ü" :¨q°!Ó4Ð4ØÑ!¨$¯(©(«*¸¹Ó*EÜ" :¨q°!Ó4Ð4àÑØ˜‹{Ü ð "Fó Gð GàœŸš ›Ó%ØH�Ü  “oÐ%ò	Hò	$ð Ñ $Ñ"2Ù˜T 4Ó0°$Ð>Ð>ð Ñä—l’l 4§8¡8£:´·±¨wÓ7ˆGØ×B¡)¨D°'Ó"BˆIÙ# Y¸Ð$@À$ÓGˆFô —l’l 4§8¡8£:°Ñ#6¼¿¹Ó?ˆGØ×B¡)¨D°'Ó"BˆIÙ# Y¸Ð$@À$ÓGˆFà‹Ø ¨6Ð1Ð1à ¨6Ð1Ð1ð ÑÙ˜d DÓ)ˆEØ×:™i¨¨dÓ:ˆEØ˜$Ð%Ð%÷
	%ð 	%ò	2ò
	:÷
	2ñ 	2÷	6ò 	6÷!	%ò !	%ðH Ñ &¨A£+Ù-Ó/Ð/ØÑ F¨Q£JÙ-Ó/Ð/ñ 3Ó4ˆØ—‘˜=¨$Ó/ˆá2Ó4ˆØ—‘˜=¨$Ó/ˆàÓ ¨aÑ 0°AÓ 5Ø Ð Ø‹_ ¨qÑ!1°AÓ!5Ø Ð ä‘7’;˜tÐ3 dÒ3¨dÑ3Ð3r8   r�   )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r  r†   r€   r+  r   r  rJ  rL   r	   r   rC   r“   r-  r.  s   @r6   r@  r@  Œ!  sl   ø† ñ%òLEòò.òòòòòòOò%õ)ð Ù˜}ð 5ñ ôH4óó öH4r8   r@  rX  c                   ó`   • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	 rS
 rSrg)Úpowerlognorm_geni¯"  a½  A power log-normal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `powerlognorm` is:

.. math::

    f(x, c, s) = \frac{c}{x s} \phi(\log(x)/s)
                 (\Phi(-\log(x)/s))^{c-1}

where :math:`\phi` is the normal pdf, and :math:`\Phi` is the normal cdf,
and :math:`x > 0`, :math:`s, c > 0`.

`powerlognorm` takes :math:`c` and :math:`s` as shape parameters.

%(after_notes)s

%(example)s

c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ )Nrj  Fr   r3  rx  rl   )rE   rŠ  rX  s      r6   ro   Úpowerlognorm_gen._shape_infoÉ"  rZ  r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  ©rE   rv   rj  rx  s       r6   rw   Úpowerlognorm_gen._pdfÎ"  rî  r8   c                 ó$  • [         R                  " U5      [         R                  " U5      -
  [         R                  " U5      -
  [        [         R                  " U5      U-  5      -   [        [         R                  " U5      * U-  5      US-
  -  -   $ r>  ©rQ   r  rØ   rÞ   rƒ  s       r6   rü   Úpowerlognorm_gen._logpdfÑ"  si   € Ü—’�q“	œBŸFšF 1›IÑ%¬¯ª¨q«	Ñ1ÜœRŸVšV A›Y¨™]Ó+ñ,äœbŸfšf Q›i˜Z¨!™^Ó,°°B±Ñ7ñ8ð 	9r8   c                 óP   • [         R                  " U R                  XU5      5      * $ rO   rÚ  rƒ  s       r6   r{   Úpowerlognorm_gen._cdfÖ"  rÜ  r8   c                 ó,   • U R                  SU-
  X#5      $ ra   )rŠ   ©rE   r…   rj  rx  s       r6   r†   Úpowerlognorm_gen._ppfÙ"  s   € Ø�y‰y˜˜Q™ Ó%Ð%r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r¥  rƒ  s       r6   r€   Úpowerlognorm_gen._sfÜ"  r§  r8   c                 óN   • [        [        R                  " U5      * U-  5      U-  $ rO   r|  rƒ  s       r6   r	  Úpowerlognorm_gen._logsfß"  s    € ÜœRŸVšV A›Y˜J¨™NÓ+¨aÑ/Ð/r8   c                 óT   • [         R                  " [        USU-  -  5      * U-  5      $ ra   rò
  r‹  s       r6   rŠ   Úpowerlognorm_gen._isfâ"  s&   € Ü�vŠv”y  Q q¡S¡Ó*Ð*¨QÑ.Ó/Ð/r8   r�   N)rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rw   rü   r{   r†   r€   r	  rŠ   r“   r�   r8   r6   r  r  ¯"  s<   † ñð. "×4Ñ4€Mòò
-ò9ò
/ò&ò,ò0õ0r8   r  Úpowerlognormc                   óH   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rSrg)Úpowernorm_genié"  a(  A power normal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `powernorm` is:

.. math::

    f(x, c) = c \phi(x) (\Phi(-x))^{c-1}

where :math:`\phi` is the normal pdf, :math:`\Phi` is the normal cdf,
:math:`x` is any real, and :math:`c > 0` [1]_.

`powernorm` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

References
----------
.. [1] NIST Engineering Statistics Handbook, Section 1.3.6.6.13,
       https://www.itl.nist.gov/div898/handbook//eda/section3/eda366d.htm

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úpowernorm_gen._shape_info#  r5  r8   c                 óD   • U[        U5      -  [        U* 5      US-
  -  -  $ r>  ©rÕ   rÛ   rn  s      r6   rw   Úpowernorm_gen._pdf#  s$   € à”˜1“‰~¤¨A¨2£°°3±Ñ!7Ñ8Ð8r8   c                 ól   • [         R                  " U5      [        U5      -   US-
  [        U* 5      -  -   $ ra   r†  rn  s      r6   rü   Úpowernorm_gen._logpdf#  s.   € Ü�vŠv�a‹yœ<¨›?Ñ*¨a°©c´<ÀÀÓ3CÑ-CÑCÐCr8   c                 óN   • [         R                  " U R                  X5      5      * $ rO   rÚ  rn  s      r6   r{   Úpowernorm_gen._cdf#  s   € Ü—’˜Ÿ™ QÓ*Ó+Ð+Ð+r8   c                 ó:   • [        [        SU-
  SU-  5      5      * $ r>  )râ   rÃ  ru  s      r6   r†   Úpowernorm_gen._ppf#  s   € Üœ#˜c A™g s¨Q¡wÓ/Ó0Ð0Ð0r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r¥  rn  s      r6   r€   Úpowernorm_gen._sf#  rU  r8   c                 ó    • U[        U* 5      -  $ rO   rç   rn  s      r6   r	  Úpowernorm_gen._logsf#  s   € Ø”<  Ó#Ñ#Ð#r8   c                 óp   • [        [        R                  " [        R                  " U5      U-  5      5      * $ rO   )râ   rQ   rÒ   r  ru  s      r6   rŠ   Úpowernorm_gen._isf#  s%   € Üœ"Ÿ&š&¤§¢¨£¨Q¡Ó/Ó0Ð0Ð0r8   r�   N)rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   r	  rŠ   r“   r�   r8   r6   r•  r•  é"  s1   † ñò6Eò9òDò,ò1ò)ò$õ1r8   r•  Ú	powernormc                   óL   • \ rS rSrSrS rS rS rS rS r	S r
SS
 jrS rSrg	)Ú	rdist_geni"#  aÛ  An R-distributed (symmetric beta) continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `rdist` is:

.. math::

    f(x, c) = \frac{(1-x^2)^{c/2-1}}{B(1/2, c/2)}

for :math:`-1 \le x \le 1`, :math:`c > 0`. `rdist` is also called the
symmetric beta distribution: if B has a `beta` distribution with
parameters (c/2, c/2), then X = 2*B - 1 follows a R-distribution with
parameter c.

`rdist` takes ``c`` as a shape parameter for :math:`c`.

This distribution includes the following distribution kernels as
special cases::

    c = 2:  uniform
    c = 3:  `semicircular`
    c = 4:  Epanechnikov (parabolic)
    c = 6:  quartic (biweight)
    c = 8:  triweight

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ri  rl   rn   s    r6   ro   Úrdist_gen._shape_infoD#  r5  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rn  s      r6   rw   Úrdist_gen._pdfH#  ry  r8   c                 óx   • [         R                  " S5      * [        R                  US-   S-  US-  US-  5      -   $ r  )rQ   r  r­  rü   rn  s      r6   rü   Úrdist_gen._logpdfK#  s4   € Ü—’�q“	ˆzœDŸL™L¨!¨a©%°©°A°a±C¸¸1¹Ó=Ñ=Ð=r8   c                 óH   • [         R                  US-   S-  US-  US-  5      $ rf  rJ  rn  s      r6   r{   Úrdist_gen._cdfN#  s%   € Ü�y‰y˜!˜a™% ™ A a¡C¨¨1©Ó-Ð-r8   c                 óH   • [         R                  US-   S-  US-  US-  5      $ rf  rC  rn  s      r6   r€   Úrdist_gen._sfQ#  s%   € Ü�x‰x˜˜Q™ ™	 1 Q¡3¨¨!©Ó,Ð,r8   c                 óF   • S[         R                  XS-  US-  5      -  S-
  $ r  )r­  r†   ru  s      r6   r†   Úrdist_gen._ppfT#  s%   € Ø”—‘˜1 ™c 1 Q¡3Ó'Ñ'¨!Ñ+Ð+r8   Nc                 ó@   • SUR                  US-  US-  U5      -  S-
  $ r  r¬  rò  s       r6   rõ   Úrdist_gen._rvsW#  s)   € Ø�<×$Ñ$ Q q¡S¨!¨A©#¨tÓ4Ñ4°qÑ8Ð8r8   c                 óŽ   • SUS-  -
  [         R                  " US-   S-  US-  5      -  nU[         R                  " SUS-  5      -  $ )Nr   rW   r•   rÑ   r£   rÉ  )rE   re   rj  Ú	numerators       r6   r+  Úrdist_gen._munpZ#  sE   € Ø˜!˜a™%‘[¤B§G¢G¨Q°©W¸©M¸1¸s¹7Ó$CÑCˆ	Øœ2Ÿ7š7 6¨1¨r©6Ó2Ñ2Ð2r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r€   r†   rõ   r+  r“   r�   r8   r6   r©  r©  "#  s1   † ñ òBEò*ò>ò.ò-ò,ô9õ3r8   r©  r­  Úrdistc                   ó¨   ^ • \ rS rSrSr\R                  rS rSS jr	S r
S rS rS rS	 rS
 rS rS rS r\\" \SS9U 4S j5       5       rSrU =r$ )Úrayleigh_genib#  a  A Rayleigh continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `rayleigh` is:

.. math::

    f(x) = x \exp(-x^2/2)

for :math:`x \ge 0`.

`rayleigh` is a special case of `chi` with ``df=2``.

%(after_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úrayleigh_gen._shape_infoz#  r¼   r8   c                 ó*   • [         R                  SXS9$ )NrW   r5  r<  rò   s      r6   rõ   Úrayleigh_gen._rvs}#  s   € Ü�w‰w�q˜tˆwÐ?Ð?r8   c                 óL   • [         R                  " U R                  U5      5      $ rO   r<  ©rE   rW  s     r6   rw   Úrayleigh_gen._pdf€#  rœ  r8   c                 ó@   • [         R                  " U5      SU-  U-  -
  $ rÛ  rg  rÃ  s     r6   rü   Úrayleigh_gen._logpdf„#  s   € Ü�vŠv�a‹y˜3 ™7 Q™;Ñ&Ð&r8   c                 ó<   • [         R                  " SUS-  -  5      * $ râ  rV  rÃ  s     r6   r{   Úrayleigh_gen._cdf‡#  s   € Ü—’˜  1¡™Ó%Ð%Ð%r8   c                 ó^   • [         R                  " S[        R                  " U* 5      -  5      $ ©Nr;  )rQ   r&  r~   rï  rÉ   s     r6   r†   Úrayleigh_gen._ppfŠ#  s    € Ü�wŠw�rœBŸHšH a R›LÑ(Ó)Ð)r8   c                 óL   • [         R                  " U R                  U5      5      $ rO   r¥  rÃ  s     r6   r€   Úrayleigh_gen._sf�#  s   € Ü�vŠv�d—k‘k !“nÓ%Ð%r8   c                 ó   • SU-  U-  $ )Nr@  r�   rÃ  s     r6   r	  Úrayleigh_gen._logsf�#  s   € Ø�a‰x˜!‰|Ðr8   c                 ó\   • [         R                  " S[         R                  " U5      -  5      $ rÊ  )rQ   r&  r  rÉ   s     r6   rŠ   Úrayleigh_gen._isf“#  s   € Ü�wŠw�rœBŸFšF 1›I‘~Ó&Ð&r8   c                 ó<  • S[         R                  -
  n[         R                  " [         R                  S-  5      US-  S[         R                  S-
  -  [         R                  " [         R                  5      -  US-  -  S[         R                  -  U-  SUS-  -  -
  4$ )NrU  rW   rÌ  rg  rË  r`  rN  rO  s     r6   r   Úrayleigh_gen._stats–#  sy   € Ø”"—%‘%‰iˆÜ—’œŸ™˜a™Ó Ø�A‘Ø”2—5‘5˜‘7‘œBŸGšG¤B§E¡E›NÑ*¨3°©8Ñ3Ø”"—%‘%‘˜‘˜B˜s A™v™IÑ%ð'ð 	'r8   c                 óN   • [         S-  S-   S[        R                  " S5      -  -
  $ )NrÑ   r   r£   rW   r^  rn   s    r6   r  Úrayleigh_gen._entropy�#  s!   € Ü�c‰z˜A‰~ ¤B§F¢F¨1£I¡Ñ-Ð-r8   aú          Notes specifically for ``rayleigh.fit``: If the location is fixed with
        the `floc` parameter, this method uses an analytical formula to find
        the scale.  Otherwise, this function uses a numerical root finder on
        the first order conditions of the log-likelihood function to find the
        MLE.  Only the (optional) `loc` parameter is used as the initial guess
        for the root finder; the `scale` parameter and any other parameters
        for the optimizer are ignored.

r  c                 óÒ  >^• UR                  SS5      (       a  [        TU ]  " T/UQ70 UD6$ [        U TX#5      u  mpEU4S jnU4S jnU4U4S jjnUbC  [        R
                  " TU-
  S:*  5      (       a  [        SS[        R                  S	9eXF" U5      4$ UR                  S
5      n	U	c  U R                  T5      S   n	Uc  UOUn
[        R                  " [        R                  " T5      [        R                  * 5      n[        X«5      n[        R                  " X¬U4S9nUR                  (       d  [!        UR"                  5      eUR$                  nU=(       d    U" U5      nXï4$ )Nrb  Fc                 ó`   >• [         R                  " TU -
  S-  5      S[        T5      -  -  S-  $ r]  )rQ   rî  rí  )r.   rF   s    €r6   Ú	scale_mleÚ#rayleigh_gen.fit.<locals>.scale_mle¯#  s/   ø€ ô —F’F˜D 3™J¨1Ñ,Ó-°´S¸³Y±Ñ?ÀBÑFÐFr8   c                 ó¦   >• TU -
  nUR                  5       nUS-  R                  5       nSU-  R                  5       nX#S[        T5      -  -  U-  -
  $ r  )rî  rí  )r.   rU	  rš  r   Ús3rF   s        €r6   Úloc_mleÚ!rayleigh_gen.fit.<locals>.loc_mle´#  sR   ø€ ð ˜‘ˆBØ—‘“ˆBØ�a‘%—‘“ˆBØ�B‘$—‘“ˆBØ˜Aœc $›i™KÑ(¨Ñ+Ñ+Ð+r8   c                 ób   >• TU -
  nUR                  5       US-  SU-  R                  5       -  -
  $ r  )rî  )r.   r/   rU	  rF   s      €r6   Úloc_mle_scale_fixedÚ-rayleigh_gen.fit.<locals>.loc_mle_scale_fixed½#  s2   ø€ ð ˜‘ˆBØ—6‘6“8˜e Q™h¨!¨B©$¯©«Ñ5Ñ5Ð5r8   r   Úrayleighr   rè  r.   r   )r3   rA   rC   rp  rQ   rì  r‡  rm   r=   rÝ  r  rk  r\   r   r+   r  rY   Úflagrq  )rE   rF   rG   r5   r  r  rØ  rÜ  rß  Úloc0rI   rT   rS   r¾  r.   r/   rÞ  s    `              €r6   rC   Úrayleigh_gen.fit #  sB  ù€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3Ü8¸¸tØ9=óEÑˆˆdõ	Gõ
	,ð ,2÷ 	6ð Ñä�vŠv�d˜T‘k QÑ&×'Ñ'Ü" :°Q¼b¿f¹fÑEÐEà˜Y t›_Ð,Ð,ð �x‰x˜‹ˆØ‰<à—>‘> $Ó'¨Ñ*ˆDà™‰gÐ-@ˆÜ—’œbŸfšf T›l¬R¯V©V¨GÓ4ˆÜ" 3Ó/ˆÜ×"Ò" 3¸Ð0@ÑAˆØ�}�}Ü  §¡Ó*Ð*Ø�h‰hˆØ×(™) C›.ˆØˆzÐr8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rõ   rw   rü   r{   r†   r€   r	  rŠ   r   r  rL   r	   rC   r“   r-  r.  s   @r6   r½  r½  b#  su   ø† ñð* "×4Ñ4€Mòô@ò'ò'ò&ò*ò&òò'ò'ò.ð Ù˜}ð 5.ñ /ô/ó/ó ö/r8   r½  rá  c                   ó†   ^ • \ rS rSrSrS rS rU 4S jrS rS r	S r
S	 rS
 rS rS rSr\" \\S9U 4S j5       rSrU =r$ )Úreciprocal_geniÞ#  aœ  A loguniform or reciprocal continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for this class is:

.. math::

    f(x, a, b) = \frac{1}{x \log(b/a)}

for :math:`a \le x \le b`, :math:`b > a > 0`. This class takes
:math:`a` and :math:`b` as shape parameters.

%(after_notes)s

%(example)s

This doesn't show the equal probability of ``0.01``, ``0.1`` and
``1``. This is best when the x-axis is log-scaled:

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> fig, ax = plt.subplots(1, 1)
>>> ax.hist(np.log10(r))
>>> ax.set_ylabel("Frequency")
>>> ax.set_xlabel("Value of random variable")
>>> ax.xaxis.set_major_locator(plt.FixedLocator([-2, -1, 0]))
>>> ticks = ["$10^{{ {} }}$".format(i) for i in [-2, -1, 0]]
>>> ax.set_xticklabels(ticks)  # doctest: +SKIP
>>> plt.show()

This random variable will be log-uniform regardless of the base chosen for
``a`` and ``b``. Let's specify with base ``2`` instead:

>>> rvs = %(name)s(2**-2, 2**0).rvs(size=1000)

Values of ``1/4``, ``1/2`` and ``1`` are equally likely with this random
variable.  Here's the histogram:

>>> fig, ax = plt.subplots(1, 1)
>>> ax.hist(np.log2(rvs))
>>> ax.set_ylabel("Frequency")
>>> ax.set_xlabel("Value of random variable")
>>> ax.xaxis.set_major_locator(plt.FixedLocator([-2, -1, 0]))
>>> ticks = ["$2^{{ {} }}$".format(i) for i in [-2, -1, 0]]
>>> ax.set_xticklabels(ticks)  # doctest: +SKIP
>>> plt.show()

c                 ó   • US:„  X!:„  -  $ rö  r�   r>	  s      r6   rf   Úreciprocal_gen._argcheck$  s   € Ø�A‘˜!™%Ñ Ð r8   c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ r¥  rl   r¦  s      r6   ro   Úreciprocal_gen._shape_info$  rª  r8   c                 ó¾   >• [        U[        5      (       a  UR                  5       n[        TU ]  U[
        R                  " U5      [
        R                  " U5      4S9$ ©Nr‰  ©r?   r*   rÛ  rA   rÝ  rQ   rk  rQ  r€  s     €r6   rÝ  Úreciprocal_gen._fitstart$  sF   ø€ Ü�dœL×)Ñ)Ø—>‘>Ó#ˆDä‰wÑ  ¬R¯VªV°D«\¼2¿6º6À$»<Ð,HÐ ÐIÐIr8   c                 ó   • X4$ rO   r�   r>	  s      r6   r¥   Úreciprocal_gen._get_support $  r„  r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  r´  s       r6   rw   Úreciprocal_gen._pdf#$  r>  r8   c                 ó´   • [         R                  " U5      * [         R                  " [         R                  " U5      [         R                  " U5      -
  5      -
  $ rO   rg  r´  s       r6   rü   Úreciprocal_gen._logpdf'$  s5   € Ü—’�q“	ˆzœBŸFšF¤2§6¢6¨!£9¬r¯vªv°a«yÑ#8Ó9Ñ9Ð9r8   c                 ó¸   • [         R                  " U5      [         R                  " U5      -
  [         R                  " U5      [         R                  " U5      -
  -  $ rO   rg  r´  s       r6   r{   Úreciprocal_gen._cdf*$  s7   € Ü—’�q“	œ"Ÿ&š& ›)Ñ#¬¯ª¨q«	´B·F²F¸1³IÑ(=Ñ>Ð>r8   c                 ó¸   • [         R                  " [         R                  " U5      U[         R                  " U5      [         R                  " U5      -
  -  -   5      $ rO   ©rQ   rÒ   r  rÈ  s       r6   r†   Úreciprocal_gen._ppf-$  s8   € Ü�vŠv”b—f’f˜Q“i !¤R§V¢V¨A£Y´·²¸³Ñ%:Ñ";Ñ;Ó<Ð<r8   c                 óB  • US:X  a  gS[         R                  " U5      [         R                  " U5      -
  -  U-  n[         R                  " [         R                  " [	        U[         R                  " U5      -  U[         R                  " U5      -  5      5      5      nXE-  $ )Nr   r•   r   )rQ   r  r.  rÒ   Ú	_log_diff)rE   re   r—   r˜   r  r  s         r6   r+  Úreciprocal_gen._munp0$  sm   € Ø�‹6ØØ”"—&’&˜“)œbŸfšf Q›iÑ'Ñ(¨1Ñ,ˆÜ�WŠW”R—V’VœI a¬"¯&ª&°«)¡m°Q´r·v²v¸a³y±[ÓAÓBÓCˆØ‰wˆr8   c                 óæ   • S[         R                  " U5      [         R                  " U5      -   -  [         R                  " [         R                  " U5      [         R                  " U5      -
  5      -   $ rÛ  rg  r>	  s      r6   r  Úreciprocal_gen._entropy7$  sE   € Ø”B—F’F˜1“I¤§¢ q£	Ñ)Ñ*¬R¯VªV´B·F²F¸1³IÄÇÂÀqÃ	Ñ4IÓ-JÑJÐJr8   z“        `loguniform`/`reciprocal` is over-parameterized. `fit` automatically
         fixes `scale` to 1 unless `fscale` is provided by the user.

r  c                 óT   >• UR                  SS5      n[        TU ]  " U/UQ7SU0UD6$ )Nr  r   )r3   rA   rC   )rE   rF   rG   r5   r  rÞ  s        €r6   rC   Úreciprocal_gen.fit>$  s1   ø€ à—‘˜( AÓ&ˆÜ‰wŠ{˜4Ð> $Ò>¨vÐ>¸Ñ>Ð>r8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   rÝ  r¥   rw   rü   r{   r†   r+  r  Úfit_noter	   r   rC   r“   r-  r.  s   @r6   ræ  ræ  Þ#  s`   ø† ñ2òf!òõ
Jòò-ò:ò?ò=òòKðL€Hñ ˜}°HÑ=ô?ó >ö?r8   ræ  Ú
loguniformÚ
reciprocalc                   óF   • \ rS rSrSrS rS rSS jrS rS r	S	 r
S
 rSrg)Úrice_geniN$  aÄ  A Rice continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `rice` is:

.. math::

    f(x, b) = x \exp(- \frac{x^2 + b^2}{2}) I_0(x b)

for :math:`x >= 0`, :math:`b > 0`. :math:`I_0` is the modified Bessel
function of order zero (`scipy.special.i0`).

`rice` takes ``b`` as a shape parameter for :math:`b`.

%(after_notes)s

The Rice distribution describes the length, :math:`r`, of a 2-D vector with
components :math:`(U+u, V+v)`, where :math:`U, V` are constant, :math:`u,
v` are independent Gaussian random variables with standard deviation
:math:`s`.  Let :math:`R = \sqrt{U^2 + V^2}`. Then the pdf of :math:`r` is
``rice.pdf(x, R/s, scale=s)``.

%(example)s

c                 ó   • US:¬  $ rö  r�   rë  s     r6   rf   Úrice_gen._argcheckk$  rë  r8   c                 ó@   • [        SSS[        R                  4S5      /$ )Nr˜   Fr   rk   rl   rn   s    r6   ro   Úrice_gen._shape_infon$  rï  r8   Nc                 ó¤   • U[         R                  " S5      -  UR                  SU-   S9-   n[         R                  " XD-  R                  SS95      $ )NrW   )rW   rÊ  r   r]  )rQ   r&  rñ   rî  )rE   r˜   ró   rô   rÌ  s        r6   rõ   Úrice_gen._rvsq$  sF   € àŒb�gŠg�a‹j‰L˜<×7Ñ7¸TÀD¹[Ð7ÐIÑIˆÜ�wŠw˜™—y‘y a�yÐ(Ó)Ð)r8   c                 ó‚   • [         R                  " [        R                  " U5      S[        R                  " U5      5      $ rD  )r~   r=  rQ   r  r±  s      r6   r{   Úrice_gen._cdfv$  s%   € Ü�yŠyœŸš 1› q¬"¯)ª)°A«,Ó7Ð7r8   c           	      ó‚   • [         R                  " [        R                  " US[         R                  " U5      5      5      $ rD  )rQ   r&  r~   rB  r  rÄ  s      r6   r†   Úrice_gen._ppfy$  s&   € Ü�wŠw”r—{’{ 1 a¬¯ª°1«Ó6Ó7Ð7r8   c                 ó|   • U[         R                  " X-
  * X-
  -  S-  5      -  [        R                  " X-  5      -  $ rv  )rQ   rÒ   r~   Úi0er±  s      r6   rw   Úrice_gen._pdf|$  s6   € ð ”2—6’6˜A™C˜& !¡#™, sÑ*Ó+Ñ+¬b¯fªf°Q±S«kÑ9Ð9r8   c                 ó¾   • US-  nSU-   nX"-  S-  nSU-  [         R                  " U* 5      -  [        R                  " U5      -  [        R                  " USU5      -  $ rï  )rQ   rÒ   r~   r6  Úhyp1f1)rE   re   r˜   Únd2Ún1rm  s         r6   r+  Úrice_gen._munp…$  s\   € Ø�‰eˆØ�‰WˆØ‰S�‰WˆØ�c‘
œRŸVšV R C›[Ñ(¬2¯8ª8°B«<Ñ7Ü—	’	˜"˜a Ó$ñ%ð 	&r8   r�   r-  )rŽ   r�   r�   r‘   r’   rf   ro   rõ   r{   r†   rw   r+  r“   r�   r8   r6   r  r  N$  s+   † ñò8òDô*ò
8ò8ò:õ&r8   r  Úricec                   ó|   • \ rS rSrSr\" \SS9S 5       rS rS r	S r
S	 r\S
 5       rS rS rS rSS jrS rSrg)Úirwinhall_geni�$  a¢	  An Irwin-Hall (Uniform Sum) continuous random variable.

An `Irwin-Hall <https://en.wikipedia.org/wiki/Irwin-Hall_distribution/>`_
continuous random variable is the sum of :math:`n` independent
standard uniform random variables [1]_ [2]_.

%(before_notes)s

Notes
-----
Applications include `Rao's Spacing Test
<https://jammalam.faculty.pstat.ucsb.edu/html/favorite/test.htm>`_,
a more powerful alternative to the Rayleigh test
when the data are not unimodal, and radar [3]_.

Conveniently, the pdf and cdf are the :math:`n`-fold convolution of
the ones for the standard uniform distribution, which is also the
definition of the cardinal B-splines of degree :math:`n-1`
having knots evenly spaced from :math:`1` to :math:`n` [4]_ [5]_.

The Bates distribution, which represents the *mean* of statistically
independent, uniformly distributed random variables, is simply the
Irwin-Hall distribution scaled by :math:`1/n`. For example, the frozen
distribution ``bates = irwinhall(10, scale=1/10)`` represents the
distribution of the mean of 10 uniformly distributed random variables.

%(after_notes)s

References
----------
.. [1] P. Hall, "The distribution of means for samples of size N drawn
        from a population in which the variate takes values between 0 and 1,
        all such values being equally probable",
        Biometrika, Volume 19, Issue 3-4, December 1927, Pages 240-244,
        :doi:`10.1093/biomet/19.3-4.240`.
.. [2] J. O. Irwin, "On the frequency distribution of the means of samples
        from a population having any law of frequency with finite moments,
        with special reference to Pearson's Type II,
        Biometrika, Volume 19, Issue 3-4, December 1927, Pages 225-239,
        :doi:`0.1093/biomet/19.3-4.225`.
.. [3] K. Buchanan, T. Adeyemi, C. Flores-Molina, S. Wheeland and D. Overturf,
        "Sidelobe behavior and bandwidth characteristics
        of distributed antenna arrays,"
        2018 United States National Committee of
        URSI National Radio Science Meeting (USNC-URSI NRSM),
        Boulder, CO, USA, 2018, pp. 1-2.
        https://www.usnc-ursi-archive.org/nrsm/2018/papers/B15-9.pdf.
.. [4] Amos Ron, "Lecture 1: Cardinal B-splines and convolution operators", p. 1
        https://pages.cs.wisc.edu/~deboor/887/lec1new.pdf.
.. [5] Trefethen, N. (2012, July). B-splines and convolution. Chebfun.
        Retrieved April 30, 2024, from http://www.chebfun.org/examples/approx/BSplineConv.html.

%(example)s
zÞ        Raises a ``NotImplementedError`` for the Irwin-Hall distribution because
        the generic `fit` implementation is unreliable and no custom implementation
        is available. Consider using `scipy.stats.fit`.

r  c                 ó   • Sn[        U5      e)Nz’The generic `fit` implementation is unreliable for this distribution, and no custom implementation is available. Consider using `scipy.stats.fit`.)r<  )rE   rF   rG   r5   Ú	fit_notess        r6   rC   Úirwinhall_gen.fitÇ$  s   € ð
9ˆ	ô " )Ó,Ð,r8   c                 óR   • US:„  [        U5      -  [        R                  " U5      -  $ rö  )r   rQ   Ú	isrealobjrd   s     r6   rf   Úirwinhall_gen._argcheckÑ$  s"   € Ø�A‘œ Q›Ñ'¬"¯,ª,°q«/Ñ9Ð9r8   c                 ó
   • SU4$ rö  r�   rd   s     r6   r¥   Úirwinhall_gen._get_supportÔ$  s   € Ø�!ˆtˆr8   c                 ó@   • [        SSS[        R                  4S5      /$ rj   rl   rn   s    r6   ro   Úirwinhall_gen._shape_info×$  rq   r8   c                 ó\   • S n[         R                  " U[         R                  /S9" X5      $ )Nc                 óª   • [         R                  " U[         R                  S9n[        R                  " X-   USS9[        R
                  " X-   USS9-  $ )Nr3	  T)Úexact)rQ   r"  Úint64r~   Ú	stirling2r  )rR  re   s     r6   ÚvmunpÚ"irwinhall_gen._munp.<locals>.vmunpÝ$  sD   € Ü—
’
˜1¤B§H¡HÑ-ˆAÜ—L’L ¡¨!°4Ñ8Ü—g’g˜a™g q°Ñ5ñ6ð 7r8   r@  rB  )rE   rR  re   r*  s       r6   r+  Úirwinhall_gen._munpÚ$  s%   € ò	7ô �|Š|˜E¬2¯:©:¨,Ò7¸ÓAÐAr8   c                 ó`   • [         R                  " U S-   5      n[        R                  " U5      $ ra   )rQ   rÁ  r   Úbasis_element)re   rÌ  s     r6   Ú	_cardbsplÚirwinhall_gen._cardbsplå$  s$   € ä�IŠI�a˜‘c‹NˆÜ×$Ò$ QÓ'Ð'r8   c                 ód   ^ • U 4S jn[         R                  " U[         R                  /S9" X5      $ )Nc                 ó2   >• TR                  U5      " U 5      $ rO   )r/  ©rv   re   rE   s     €r6   ÚvpdfÚ irwinhall_gen._pdf.<locals>.vpdfë$  s   ø€ Ø—>‘> !Ô$ QÓ'Ð'r8   r@  rB  )rE   rv   re   r4  s   `   r6   rw   Úirwinhall_gen._pdfê$  s$   ø€ õ	(ä�|Š|˜D¬"¯*©*¨Ò6°qÓ<Ð<r8   c                 ód   ^ • U 4S jn[         R                  " U[         R                  /S9" X5      $ )Nc                 óN   >• TR                  U5      R                  5       " U 5      $ rO   ©r/  Úantiderivativer3  s     €r6   ÚvcdfÚ irwinhall_gen._cdf.<locals>.vcdfð$  s    ø€ Ø—>‘> !Ó$×3Ñ3Ô5°aÓ8Ð8r8   r@  rB  )rE   rv   re   r;  s   `   r6   r{   Úirwinhall_gen._cdfï$  s$   ø€ õ	9ä�|Š|˜D¬"¯*©*¨Ò6°qÓ<Ð<r8   c                 ód   ^ • U 4S jn[         R                  " U[         R                  /S9" X5      $ )Nc                 óR   >• TR                  U5      R                  5       " X-
  5      $ rO   r9  r3  s     €r6   ÚvsfÚirwinhall_gen._sf.<locals>.vsfõ$  s"   ø€ Ø—>‘> !Ó$×3Ñ3Ô5°a±cÓ:Ð:r8   r@  rB  )rE   rv   re   r@  s   `   r6   r€   Úirwinhall_gen._sfô$  s$   ø€ õ	;ä�|Š|˜C¬¯©¨Ò5°aÓ;Ð;r8   Nc                 ó,   • [         SS j5       nU" XUS9$ )Nc                 ó¤   • [         R                  " U 5      R                  [        5      n Uc  U 4OU /UQ7nUR	                  US9R                  SS9$ )NrÊ  r   r]  )rQ   r!  r²  r*  rË  rî  )re   ró   rô   Úusizes       r6   Ú_rvs1Ú!irwinhall_gen._rvs.<locals>._rvs1ú$  sO   € ä—’˜“×"Ñ"¤3Ó'ˆAØ ™L�Q‘D¨q¨j°4©jˆEØ×'Ñ'¨UÐ'Ð3×7Ñ7¸QÐ7Ð?Ð?r8   r5  r-  )r   )rE   re   ró   rô   rG   rF  s         r6   rõ   Úirwinhall_gen._rvsù$  s%   € Ü	#ó	@ó 
$ð	@ñ �Q°Ñ=Ð=r8   c                 ó&   • US-  US-  SSSU-  -  4$ )NrW   r  r   r  r¶  r�   rd   s     r6   r   Úirwinhall_gen._stats%  s#   € ð �‰s�A�b‘D˜!˜R  1¡™XÐ%Ð%r8   r�   r-  )rŽ   r�   r�   r‘   r’   r
   r   rC   rf   r¥   ro   r+  rw  r/  rw   r{   r€   rõ   r   r“   r�   r8   r6   r  r  �$  sm   † ñ5ñn   ð 6?ñ @ñ-ó	@ð-ò:òòCò	Bð ñ(ó ð(ò=ò
=ò
<ô
>õ&r8   r  Ú	irwinhall)r”   re   c                   ó@   • \ rS rSrSrS rS rS rS rS r	SS	 jr
S
rg)Úrecipinvgauss_geni%  a}  A reciprocal inverse Gaussian continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `recipinvgauss` is:

.. math::

    f(x, \mu) = \frac{1}{\sqrt{2\pi x}}
                \exp\left(\frac{-(1-\mu x)^2}{2\mu^2x}\right)

for :math:`x \ge 0`.

`recipinvgauss` takes ``mu`` as a shape parameter for :math:`\mu`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r¡  rl   rn   s    r6   ro   Úrecipinvgauss_gen._shape_info*%  rH  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  rª  s      r6   rw   Úrecipinvgauss_gen._pdf-%  s   € ô �vŠv�d—l‘l 1Ó)Ó*Ð*r8   c                 óX   • [         R                  " US:„  X4S [        R                  * S9$ )Nr   c                 óŒ   • SX-  -
  S-  * SU -  US-  -  -  S[         R                  " S[         R                  -  U -  5      -  -
  $ )Nr   rÑ   rW   r£   r  )rv   r}  s     r6   r  Ú+recipinvgauss_gen._logpdf.<locals>.<lambda>5%  sD   € ˜Q ¡™X¨™OÐ+¨q°©s°2°s±7©{Ñ;Ø ¤§¢¨¬"¯%©%©°©	Ó!2Ñ2ò3r8   r  rc  rª  s      r6   rü   Úrecipinvgauss_gen._logpdf2%  s,   € Ü�ŠØ�‰E�A�7ñ4äŸ™�wñ	 ð 	 r8   c                 óÆ   • SU-  U-
  nSU-  U-   nS[         R                  " U5      -  n[        U* U-  5      [         R                  " SU-  5      [        U* U-  5      -  -
  $ ©Nr•   rÑ   ©rQ   r&  rÛ   rÒ   ©rE   rv   r}  Útrm1Útrm2Úisqxs         r6   r{   Úrecipinvgauss_gen._cdf9%  s_   € Ø�2‰v˜‰zˆØ�2‰v˜‰zˆØ”2—7’7˜1“:‰~ˆÜ˜$˜˜t™Ó$¤r§v¢v¨c°"©f£~´iÀÀÀdÁ
Ó6KÑ'KÑKÐKr8   c                 óÂ   • SU-  U-
  nSU-  U-   nS[         R                  " U5      -  n[        XS-  5      [         R                  " SU-  5      [        U* U-  5      -  -   $ rW  rX  rY  s         r6   r€   Úrecipinvgauss_gen._sf?%  s[   € Ø�2‰v˜‰zˆØ�2‰v˜‰zˆØ”2—7’7˜1“:‰~ˆÜ˜™Ó#¤b§f¢f¨S°©V£n´YÀ¸uÀT¹zÓ5JÑ&JÑJÐJr8   Nc                 ó*   • SUR                  USUS9-  $ r¤  r¥  r§  s       r6   rõ   Úrecipinvgauss_gen._rvsE%  s   € Ø�<×$Ñ$ R¨°4Ð$Ð8Ñ8Ð8r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r€   rõ   r“   r�   r8   r6   rM  rM  %  s(   † ñò,Fò+ò
 òLòK÷9r8   rM  Úrecipinvgaussc                   óL   • \ rS rSrSrS rS rS rS rS r	SS	 jr
S
 rS rSrg)Úsemicircular_geniL%  aÌ  A semicircular continuous random variable.

%(before_notes)s

See Also
--------
rdist

Notes
-----
The probability density function for `semicircular` is:

.. math::

    f(x) = \frac{2}{\pi} \sqrt{1-x^2}

for :math:`-1 \le x \le 1`.

The distribution is a special case of `rdist` with ``c = 3``.

%(after_notes)s

References
----------
.. [1] "Wigner semicircle distribution",
       https://en.wikipedia.org/wiki/Wigner_semicircle_distribution

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úsemicircular_gen._shape_infok%  r¼   r8   c                 ó`   • S[         R                  -  [         R                  " SX-  -
  5      -  $ rï  rN  r¿   s     r6   rw   Úsemicircular_gen._pdfn%  s#   € Ø”2—5‘5‰yœŸš  1¡3¡›Ñ'Ð'r8   c                 óŒ   • [         R                  " S[         R                  -  5      S[        R                  " U* U-  5      -  -   $ r]  ræ  r¿   s     r6   rü   Úsemicircular_gen._logpdfq%  s0   € Ü�vŠv�aœŸ™‘g‹ ¤R§X¢X¨q¨b°©d£^Ñ!3Ñ3Ð3r8   c                 óš   • SS[         R                  -  U[         R                  " SX-  -
  5      -  [         R                  " U5      -   -  -   $ )Nr£   r•   r   )rQ   r  r&  r]  r¿   s     r6   r{   Úsemicircular_gen._cdft%  s:   € Ø�3”r—u‘u‘9˜a¤§¢¨¨!©#©£Ñ.´·²¸1³Ñ=Ñ>Ñ>Ð>r8   c                 ó.   • [         R                  US5      $ ©NrÌ  )r»  r†   rÉ   s     r6   r†   Úsemicircular_gen._ppfw%  s   € Ü�z‰z˜!˜QÓÐr8   Nc                 ó¸   • [         R                  " UR                  US95      n[         R                  " [         R                  UR                  US9-  5      nX4-  $ rù  )rQ   r&  rË  rQ  r  )rE   ró   rô   rW  r—   s        r6   rõ   Úsemicircular_gen._rvsz%  sL   € ô �GŠG�L×(Ñ(¨dÐ(Ð3Ó4ˆÜ�FŠF”2—5‘5˜<×/Ñ/°TÐ/Ð:Ñ:Ó;ˆØ‰uˆr8   c                 ó   • g)N)r   rÖ  r   r­  r�   rn   s    r6   r   Úsemicircular_gen._stats�%  rE  r8   c                 ó   • g)NgzCÏ‘ ¡ä?r�   rn   s    r6   r  Úsemicircular_gen._entropy„%  s   € Ø%r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   rõ   r   r  r“   r�   r8   r6   rd  rd  L%  s/   † ñò<ò(ò4ò?ò ôò õ&r8   rd  Úsemicircularc                   óF   • \ rS rSrSrS rS rS rS rS r	SS jr
S	 rS
rg)Úskewcauchy_geni‹%  a¢  A skewed Cauchy random variable.

%(before_notes)s

See Also
--------
cauchy : Cauchy distribution

Notes
-----

The probability density function for `skewcauchy` is:

.. math::

    f(x) = \frac{1}{\pi \left(\frac{x^2}{\left(a\, \text{sign}(x) + 1
                                               \right)^2} + 1 \right)}

for a real number :math:`x` and skewness parameter :math:`-1 < a < 1`.

When :math:`a=0`, the distribution reduces to the usual Cauchy
distribution.

%(after_notes)s

References
----------
.. [1] "Skewed generalized *t* distribution", Wikipedia
   https://en.wikipedia.org/wiki/Skewed_generalized_t_distribution#Skewed_Cauchy_distribution

%(example)s

c                 ó4   • [         R                  " U5      S:  $ ra   )rQ   r  rG  s     r6   rf   Úskewcauchy_gen._argcheck­%  s   € Ü�vŠv�a‹y˜1‰}Ðr8   c                 ó    • [        SSSS5      /$ )Nr—   F)r­  r•   r3  ©r   rn   s    r6   ro   Úskewcauchy_gen._shape_info°%  s   € Ü˜3  {°NÓCÐDÐDr8   c                 óz   • S[         R                  US-  U[         R                  " U5      -  S-   S-  -  S-   -  -  $ rf  )rQ   r  rR   r8  s      r6   rw   Úskewcauchy_gen._pdf³%  s:   € Ø”B—E‘E˜Q ™T Q¬¯ª°«¡^°aÑ%7¸!Ñ$;Ñ;¸aÑ?Ñ@ÑAÐAr8   c                 ó   • [         R                  " US:*  SU-
  S-  SU-
  [         R                  -  [         R                  " USU-
  -  5      -  -   SU-
  S-  SU-   [         R                  -  [         R                  " USU-   -  5      -  -   5      $ ©Nr   r   rW   )rQ   rÃ  r  rù  r8  s      r6   r{   Úskewcauchy_gen._cdf¶%  s   € Ü�xŠx˜˜Q™Ø˜Q™ !™ q¨1¡u´·±¡o¼¿	º	À!ÀqÈ1ÁuÁ+Ó8NÑ&NÑNØ˜Q™ !™ q¨1¡u´·±¡o¼¿	º	À!ÀqÈ1ÁuÁ+Ó8NÑ&NÑNóPð 	Pr8   c           
      óB  • XR                  SU5      :  n[        R                  " U[        R                  " [        R                  SU-
  -  USU-
  S-  -
  -  5      SU-
  -  [        R                  " [        R                  SU-   -  USU-
  S-  -
  -  5      SU-   -  5      $ r�  )r{   rQ   rÃ  rì  r  )rE   rv   r—   ra  s       r6   r†   Úskewcauchy_gen._ppf»%  s�   € Ø—	‘	˜!˜Q“ÑˆÜ�xŠx˜ÜŸšœrŸu™u¨¨A©™°!°q¸1±uÀ±k±/ÑBÓCÀqÈ1ÁuÑMÜŸšœrŸu™u¨¨A©™°!°q¸1±uÀ±k±/ÑBÓCÀqÈ1ÁuÑMóOð 	Or8   c                 ó~   • [         R                  [         R                  [         R                  [         R                  4$ rO   r-  )rE   r—   r}  s      r6   r   Úskewcauchy_gen._statsÁ%  r/  r8   c                 ó˜   • [        U[        5      (       a  UR                  5       n[        R                  " U/ SQ5      u  p#nSX4U-
  S-  4$ )Nr5  r”   rW   r9  )rE   rF   r<  r=  r>  s        r6   rÝ  Úskewcauchy_gen._fitstartÄ%  sD   € ô �dœL×)Ñ)Ø—>‘>Ó#ˆDÜŸš dªLÓ9‰ˆ�#Ø�C ™) Q™Ð&Ð&r8   r�   Nr›  )rŽ   r�   r�   r‘   r’   rf   ro   rw   r{   r†   r   rÝ  r“   r�   r8   r6   rx  rx  ‹%  s/   † ñ òBòEòBòPò
Oô.õ'r8   rx  Ú
skewcauchyc                   ó    ^ • \ rS rSrSrS rS rS rS rU 4S jr	S r
S	 rS
 rSS jrSS jr\S 5       rS r\" \SS9U 4S j5       rSrU =r$ )Úskewnorm_geniÑ%  aõ  A skew-normal random variable.

%(before_notes)s

Notes
-----
The pdf is::

    skewnorm.pdf(x, a) = 2 * norm.pdf(x) * norm.cdf(a*x)

`skewnorm` takes a real number :math:`a` as a skewness parameter
When ``a = 0`` the distribution is identical to a normal distribution
(`norm`). `rvs` implements the method of [1]_.

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

%(after_notes)s

References
----------
.. [1] A. Azzalini and A. Capitanio (1999). Statistical applications of
    the multivariate skew-normal distribution. J. Roy. Statist. Soc.,
    B 61, 579-602. :arxiv:`0911.2093`
.. [2] The Boost Developers. "Boost C++ Libraries". https://www.boost.org/.

%(example)s

c                 ó.   • [         R                  " U5      $ rO   rä  rG  s     r6   rf   Úskewnorm_gen._argcheckï%  ræ  r8   c                 ó^   • [        SS[        R                  * [        R                  4S5      /$ )Nr—   Fr3  rl   rn   s    r6   ro   Úskewnorm_gen._shape_infoò%  rê  r8   c                 ó@   • [         R                  " US:H  X4S S 5      $ )Nr   c                 ó   • [        U 5      $ rO   rø   ©rv   r—   s     r6   r  Ú#skewnorm_gen._pdf.<locals>.<lambda>ø%  s   € œ 1œr8   c                 ó:   • S[        U 5      -  [        X-  5      -  $ rv  r™  r’  s     r6   r  r“  ù%  s   € ˜œI a›L™¬°1±3«Ò7r8   rK  r8  s      r6   rw   Úskewnorm_gen._pdfõ%  s$   € Ü�ŠØ�‰F�Q�FÙ%Ù7ó9ð 	9r8   c                 ó@   • [         R                  " US:H  X4S S 5      $ )Nr   c                 ó   • [        U 5      $ rO   rû   r’  s     r6   r  Ú&skewnorm_gen._logpdf.<locals>.<lambda>þ%  s   € œ aœr8   c                 ób   • [         R                  " S5      [        U 5      -   [        X-  5      -   $ rD  r†  r’  s     r6   r  r˜  ÿ%  s!   € œŸš ›¤<°£?Ñ2´<ÀÁÓ3DÒDr8   rK  r8  s      r6   rü   Úskewnorm_gen._logpdfû%  s&   € Ü�ŠØ�‰F�Q�FÙ(ÙDóFð 	Fr8   c                 ó  >• [         R                  " U5      n[        R                  " USSU5      n[         R                  " X#R
                  5      nUS:  US:„  -  n[        TU ]  X   X$   5      X4'   [         R                  " USS5      $ )Nr”   r•   g�íµ ÷Æ°>r   r   )	rQ   r	  rs   Ú_skewnorm_cdfr   rj  rA   r{   rÉ  )rE   rv   r—   r¯   Úi_small_cdfrÞ  s        €r6   r{   Úskewnorm_gen._cdf&  su   ø€ Ü�MŠM˜!ÓˆÜ×Ò  3¨¨QÓ/ˆä�OŠO˜AŸy™yÓ)ˆà˜T‘z a¨!¡eÑ,ˆÜ ™7™<¨©¸¹ÓGˆÑÜ�wŠw�s˜A˜qÓ!Ð!r8   c                 ó4   • [         R                  " USSU5      $ ©Nr”   r•   )rs   Ú_skewnorm_ppfr8  s      r6   r†   Úskewnorm_gen._ppf&  ó   € Ü× Ò   C¨¨aÓ0Ð0r8   c                 ó*   • U R                  U* U* 5      $ rO   rü	  r8  s      r6   r€   Úskewnorm_gen._sf&  s   € ð �y‰y˜!˜˜a˜RÓ Ð r8   c                 ó4   • [         R                  " USSU5      $ r   )rs   Ú_skewnorm_isfr8  s      r6   rŠ   Úskewnorm_gen._isf&  r£  r8   c                 óú   • UR                  US9nUR                  US9nU[        R                  " SUS-  -   5      -  nXd-  U[        R                  " SUS-  -
  5      -  -   n[        R                  " US:¬  Xw* 5      $ )NrÊ  r   rW   r   )rú  rQ   r&  rÃ  )rE   r—   ró   rô   Úu0r%  r'  r8  s           r6   rõ   Úskewnorm_gen._rvs&  s|   € Ø× Ñ  dÐ Ð+ˆØ×Ñ TÐÐ*ˆØŒb�gŠg�a˜!˜Q™$‘hÓÑˆØ‰T�A”b—g’g˜a ! Q¡$™hÓ'Ñ'Ñ'ˆÜ�xŠx˜˜a™  SÓ)Ð)r8   c                 ó¸  • / SQn[         R                  " S[         R                  -  5      U-  [         R                  " SUS-  -   5      -  nSU;   a  XCS'   SU;   a  SUS-  -
  US'   SU;   a<  S[         R                  -
  S-  U[         R                  " SUS-  -
  5      -  S	-  -  US'   S
U;   a+  S[         R                  S	-
  -  US-  SUS-  -
  S-  -  -  US	'   U$ )Nr  rW   r   r  r   r%  rx  rU  rÌ  rz  rL  )rE   r—   r}  r—  Úconsts        r6   r   Úskewnorm_gen._stats&  sÖ   € Ú)ˆÜ—’˜œ"Ÿ%™%™Ó  1Ñ$¤R§W¢W¨Q°°A±©XÓ%6Ñ6ˆà�'‹>Ø�1‰IØ�'‹>Ø˜E 1™H™ˆF�1‰IØ�'‹>ØœbŸe™e™) Q™¨5´·²¸¸UÀA¹X¹Ó1FÑ+FÈÑ*JÑJˆF�1‰IØ�'‹>ØœBŸE™E A™I™¨5°!©8°Q¸À¹±\ÀAÑ4EÑ+EÑFˆF�1‰Iàˆr8   c                 óú   • [        S/5      [        SS/5      [        / SQ5      [        / SQ5      [        / SQ5      [        / SQ5      [        / SQ5      [        / S	Q5      [        / S
Q5      [        / SQ5      S.
nU$ )Nr   rÌ  r  )ru  iöÿÿÿrÌ  )éi   i—ÿÿÿé?   iñÿÿÿ)i±  iûÿÿin  iäýÿÿr°  )é›(  iS¼ÿÿi6Q  iþÅÿÿi�  iOüÿÿ)iß iBàûÿi�/ iÌúÿiÉo iàþÿr²  )éî iƒÔ·ÿiáç� i«Yeÿi{Hx i±óÄÿi“§ i!ðýÿ)	i!Ïi¨×…úiì‡€iø†‘ïiV ùiX'‹õiƒliˆ‘çþr³  )
is_'i§áìŠl   </õ1 lýÿÿÿdy˜( l   J8²D lýÿÿÿ.~ l   ¬-Rx iìW¢i[©iß0òý)
r   rÌ  r¶  r  ry  rà  é   ru  é   é   r   )rE   Úskewnorm_odd_momentss     r6   Ú_skewnorm_odd_momentsÚ"skewnorm_gen._skewnorm_odd_moments2&  s‚   € ô ˜1˜#‹Ü˜1˜b˜'Ó"Üš,Ó'ÜÒ.Ó/ÜÒ7Ó8ÜÒEÓFÜò #ó $äò 8ó 9äò %ó &ô ò 2ó 3ñ 
Ðð$ $Ð#r8   c                 ó  • US-  (       aQ  US:”  a  [        S5      eU[        R                  " SUS-  -   5      -  nX0R                  U   " US-  5      -  [        -  $ [
        R                  " US-   S-  5      SUS-  -  -  [        -  $ )NrW   r¶  zKskewnorm noncentral moments not implemented for odd orders greater than 19.r   )r<  rQ   r&  r¸  r'   r~   r6  r&   )rE   rR  r—   rW	  s       r6   r+  Úskewnorm_gen._munpH&  s‘   € Ø�1�9Ø�r‹zÜ)ð +5ó 6ð 6ð
 ”b—g’g˜a ! Q¡$™hÓ'Ñ'ˆEØ×6Ñ6°uÒ=¸eÀQ¹hÓGÑGÜ%ñ&ð 'ô —8’8˜U Q™Y¨™MÓ*¨Q°°q±©\Ñ9¼HÑDÐDr8   aÕ          If ``method='mm'``, parameters fixed by the user are respected, and the
        remaining parameters are used to match distribution and sample moments
        where possible. For example, if the user fixes the location with
        ``floc``, the parameters will only match the distribution skewness and
        variance to the sample skewness and variance; no attempt will be made
        to match the means or minimize a norm of the errors.
        Note that the maximum possible skewness magnitude of a
        `scipy.stats.skewnorm` distribution is approximately 0.9952717; if the
        magnitude of the data's sample skewness exceeds this, the returned
        shape parameter ``a`` will be infinite.
        

r  c           	      óz  >• UR                  SS5      (       a  [        TU ]  " U/UQ70 UD6$ [        U[        5      (       a9  UR                  5       S:X  a  UR                  5       nO[        TU ]  " U/UQ70 UD6$ [        XX#5      u  ppVUR                  SS5      R                  5       nS nS n	US:X  a  S	u  p«nO;[        U5      (       a  US   OS n
UR                  S
S 5      nUR                  SS 5      nUcÉ  U
cÆ  [        R                  " U5      nUS:X  a  [        R                  " USS5      nO U" S5      n[        R                  " XÞ* U5      nU	" U5      n[        R                  " SS9   [        R                   " [        R"                  " US-  SUS-  -
  5      5      [        R$                  " U5      -  n
S S S 5        O&Ub  UOU
n
U
[        R                   " SU
S-  -   5      -  nUcM  UcJ  [        R&                  " U5      n[        R                   " USSUS-  -  [        R(                  -  -
  -  5      nOUb  UnUcI  UcF  [        R*                  " U5      nUXÏ-  [        R                   " S[        R(                  -  5      -  -
  nOUb  UnUS:X  a  X«U4$ [        TU ]  " X4X¼S.UD6$ ! , (       d  f       NÑ= f)Nrb  Fr   r1   r;   c                 óÊ   • S[         R                  -
  S-  U [         R                  " S[         R                  -  5      -  S-  SSU S-  -  [         R                  -  -
  S-  -  -  $ )NrU  rW   rÌ  r   rg  rN  ©r'  s    r6   Úskew_dÚ skewnorm_gen.fit.<locals>.skew_dy&  s]   € Ø”b—e‘e‘G˜Q‘; 1¤r§w¢w¨q´2·5±5©yÓ'9Ñ#9¸AÑ"=Ø%&¨¨1¨a©4©´"·%±%©Ñ%7¸3Ñ$?ñ#@ñ Að Ar8   c                 óð   • [         R                  " U 5      S-  n[         R                  " U 5      [         R                  " [         R                  S-  U-  US[         R                  -
  S-  S-  -   -  5      -  $ )Nr˜  rW   rU  )rQ   r  rR   r&  r  )rh  Ús_23s     r6   Úd_skewÚ skewnorm_gen.fit.<locals>.d_skew}&  s^   € Ü—6’6˜$“< #Ñ&ˆDÜ—7’7˜4“=¤2§7¢7Ü—‘�a‘˜$‘ $¨1¬r¯u©u©9°a©-¸3Ñ)?Ñ"?Ñ@ó$ñ ð r8   r<   rj  r.   r/   g®Gáz®ï¿g®Gáz®ï?r   rp  rq  rW   ro  )r3   rA   rC   r?   r*   r@   rÛ  rp  r=   r>   rí  rT  rh  rQ   rÉ  rs  r&  rr  rR   rð  r  r%  )rE   rF   rG   r5   rã  r  r  r1   r¿  rÃ  r—   r.   r/   rx  Ús_maxr'  r%  r  rÞ  s                     €r6   rC   Úskewnorm_gen.fit\&  sy  ø€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3Ü�dœL×)Ñ)Ø× Ñ Ó" aÓ'Ø—~‘~Ó'‘ä‘w’{ 4Ð7¨$Ò7°$Ñ7Ð7ô "=¸TØ=Aó"IÑˆ�$à—‘˜( EÓ*×0Ñ0Ó2ˆò	Aò	ð �T‹>Ø,‰MˆA‘Eä˜tŸ9™9��Q’¨$ˆAØ—(‘(˜5 $Ó'ˆCØ—H‘H˜W dÓ+ˆEà‰:˜!™)ô —
’
˜4Ó ˆAØ˜‹ô —G’G˜A˜u dÓ+‘á˜q›	�Ü—G’G˜A˜v uÓ-�Ù�q“	ˆAÜ—’ HÓ-Ü—G’GœBŸIšI a¨¡d¨Q¨q°!©t©VÓ5Ó6´r·w²w¸q³zÑA�÷ .Ð-ð ‘n‘¨!ˆAØ”B—G’G˜A  1¡™HÓ%Ñ%ˆAà‰>˜e™mÜ—’�t“ˆAÜ—G’G˜A  Q q¨!¡t¡V¬B¯E©E¡\Ñ!1Ñ2Ó3‰EØÑØˆEà‰<˜C™KÜ—’˜“ˆAØ�e‘gœbŸgšg a¬¯©¡gÓ.Ñ.Ñ.‰CØÑØˆCà�T‹>Ø˜5�=Ð ô ‘7’;˜tÐE¨CÑEÀÑEÐE÷/ .Õ-ús   Å.AJ,Ê,
J:r�   r-  r›  )rŽ   r�   r�   r‘   r’   rf   ro   rw   rü   r{   r†   r€   rŠ   rõ   r   r   r¸  r+  r	   r   rC   r“   r-  r.  s   @r6   r‹  r‹  Ñ%  sz   ø† ñò:òKò9òFõ"ò1ò!ò
1ô*ôð* ñ$ó ð$ò*Eñ( ˜}ð 5ñ ôGFóöGFr8   r‹  Úskewnormc                   óZ   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rSU 4S
 jjrSrU =r$ )Útrapezoid_geniµ&  a?  A trapezoidal continuous random variable.

%(before_notes)s

Notes
-----
The trapezoidal distribution can be represented with an up-sloping line
from ``loc`` to ``(loc + c*scale)``, then constant to ``(loc + d*scale)``
and then downsloping from ``(loc + d*scale)`` to ``(loc+scale)``.  This
defines the trapezoid base from ``loc`` to ``(loc+scale)`` and the flat
top from ``c`` to ``d`` proportional to the position along the base
with ``0 <= c <= d <= 1``.  When ``c=d``, this is equivalent to `triang`
with the same values for `loc`, `scale` and `c`.
The method of [1]_ is used for computing moments.

`trapezoid` takes :math:`c` and :math:`d` as shape parameters.

%(after_notes)s

The standard form is in the range [0, 1] with c the mode.
The location parameter shifts the start to `loc`.
The scale parameter changes the width from 1 to `scale`.

%(example)s

References
----------
.. [1] Kacker, R.N. and Lawrence, J.F. (2007). Trapezoidal and triangular
   distributions for Type B evaluation of standard uncertainty.
   Metrologia 44, 117-127. :doi:`10.1088/0026-1394/44/2/003`


c                 ó:   • US:¬  US:*  -  US:¬  -  US:*  -  X!:¬  -  $ r#  r�   ©rE   rj  r'  s      r6   rf   Útrapezoid_gen._argcheck×&  s.   € Ø�Q‘˜1 ™6Ñ" a¨1¡fÑ-°°a±Ñ8¸A¹FÑCÐCr8   c                 ó@   • [        SSSS5      n[        SSSS5      nX/$ )Nrj  F©r   r•   ©TTr'  r|  r‰  s      r6   ro   Útrapezoid_gen._shape_infoÚ&  s)   € Ü˜˜U H¨lÓ;ˆÜ˜˜U H¨lÓ;ˆØˆxˆr8   c                 ó\   • SX2-
  S-   -  n[        X:  X!:*  X:*  -  X:„  /S S S /XX445      $ )NrW   r   c                 ó   • X0-  U-  $ rO   r�   ©rv   rj  r'  rÌ  s       r6   r  Ú$trapezoid_gen._pdf.<locals>.<lambda>å&  s
   € ¨q©u°qªyr8   c                 ó   • U$ rO   r�   rÓ  s       r6   r  rÔ  æ&  s   € ©qr8   c                 ó   • USU -
  -  SU-
  -  $ ra   r�   rÓ  s       r6   r  rÔ  ç&  s   € ¨q°A°a±C©y¸A¸a¹CÒ/@r8   r   )rE   rv   rj  r'  rÌ  s        r6   rw   Útrapezoid_gen._pdfß&  sR   € Ø�‘�Q‘‰Kˆä˜A™EØ™V¨©Ñ/Ø™Eð#ñ 9Ù0Ù@ðBð  !˜<ó)ð 	)r8   c                 óH   • [        X:  X!:*  X:*  -  X:„  /S S S /XU45      $ )Nc                 ó"   • U S-  U-  X!-
  S-   -  $ r  r�   ©rv   rj  r'  s      r6   r  Ú$trapezoid_gen._cdf.<locals>.<lambda>î&  s   € ¨A¨q©D°1©H¸¹¸A¹Ò,>r8   c                 ó&   • USX-
  -  -   X!-
  S-   -  $ r  r�   rÚ  s      r6   r  rÛ  ï&  s   € ¨Q°°a±c±©]¸q¹sÀ1¹uÒ,Er8   c                 ó4   • SSU -
  S-  X!-
  S-   -  SU-
  -  -
  $ rf  r�   rÚ  s      r6   r  rÛ  ð&  s/   € ¨A°°!±¸©zØ23±#°a±%ñ09Ø<=¸a¹Cñ0Aò -Br8   r   r   s       r6   r{   Útrapezoid_gen._cdfê&  sF   € Ü˜A™EØ™V¨©Ñ/Ø™Eð#ñ ?ÙEñBðCð  !˜9ó&ð 	&r8   c                 óF  • U R                  X"U5      U R                  X2U5      pTX:  X:*  X:„  /n[        R                  " X-  SU-   U-
  -  5      SU-  SU-   U-
  -  SU-  -   S[        R                  " SU-
  X2-
  S-   -  SU-
  -  5      -
  /n[        R                  " Xg5      $ rÉ
  )r{   rQ   r&  Úselect)rE   r…   rj  r'  ÚqcÚqdr†  r¬  s           r6   r†   Útrapezoid_gen._ppfô&  s«   € Ø—‘˜1 Ó# T§Y¡Y¨q°QÓ%7ˆBØ‘F˜A™G Q¡VÐ,ˆÜ—g’g˜a™e q¨1¡u¨q¡yÑ1Ó2Ø˜A‘g  Q¡¨¡Ñ+¨c°A©gÑ5Øœ"Ÿ'š' 1 q¡5¨Q©U°Q©YÑ"7¸1¸q¹5Ñ"AÓBÑBðDˆ
ô �yŠy˜Ó.Ð.r8   c                 ó¨   ^• UTS-   -  n[        US:H  SU:  US:  -  US:H  /S U4S jU4S j/U/5      nSSU-   U-
  -  XT-
  -  TS-   TS-   -  -  nU$ )	Nr   r”   r•   c                 ó   • gr>  r�   r¾  s    r6   r  Ú%trapezoid_gen._munp.<locals>.<lambda>'  s   € �sr8   c                 óp   >• [         R                  " TS-   [         R                  " U 5      -  5      U S-
  -  $ rH
  )rQ   rt  r  ©r'  re   s    €r6   r  ræ  '  s(   ø€ ”r—x’x  1¡¬¯ª¨q«	Ñ 1Ó2°a¸±eÒ<r8   c                 ó   >• TS-   $ rD  r�   rè  s    €r6   r  ræ  '  s	   ø€ �q˜’sr8   rÑ   rW   r   )rE   re   rj  r'  Úab_termÚdc_termr¶  s    `     r6   r+  Útrapezoid_gen._munpü&  s�   ø€ ð �a˜‘c‘(ˆÜØ�#‰X˜˜a™ A¨¡GÑ,¨a°3©hÐ7ÙÜ<Üðð ˆCóˆð �S˜‘U˜1‘W‰o Ñ!2Ñ3¸¸!¹ÀÀ!Á±}ÑEˆØˆ
r8   c                 ój   • SSU-
  U-   -  SU-   U-
  -  [         R                  " SSU-   U-
  -  5      -   $ r¢   rg  rË  s      r6   r  Útrapezoid_gen._entropy'  s=   € ð �c˜!‘e˜A‘g‰ # a¡%¨¡'Ñ*¬R¯VªV°C¸3¸q¹5À¹7±OÓ-DÑDÐDr8   c                 ó(   >• Uc  Sn[         TU ]  XS9$ )N)g…ëQ¸Õ?g…ëQ¸å?r‰  r  r~	  s      €r6   rÝ  Útrapezoid_gen._fitstart'  s    ø€ à‰<ØˆDÜ‰wÑ  Ð Ð1Ð1r8   r�   rO   )rŽ   r�   r�   r‘   r’   rf   ro   rw   r{   r†   r+  r  rÝ  r“   r-  r.  s   @r6   rÉ  rÉ  µ&  s8   ø† ñ òBDòò
	)ò&ò/òò2E÷2õ 2r8   rÉ  Ú	trapezoidc                   óL   • \ rS rSrSrSS jrS rS rS rS r	S	 r
S
 rS rSrg)Ú
triang_geni('  a  A triangular continuous random variable.

%(before_notes)s

Notes
-----
The triangular distribution can be represented with an up-sloping line from
``loc`` to ``(loc + c*scale)`` and then downsloping for ``(loc + c*scale)``
to ``(loc + scale)``.

`triang` takes ``c`` as a shape parameter for :math:`0 \le c \le 1`.

%(after_notes)s

The standard form is in the range [0, 1] with c the mode.
The location parameter shifts the start to `loc`.
The scale parameter changes the width from 1 to `scale`.

%(example)s

Nc                 ó*   • UR                  SUSU5      $ r#  )Ú
triangularrò  s       r6   rõ   Útriang_gen._rvs>'  s   € Ø×&Ñ& q¨!¨Q°Ó5Ð5r8   c                 ó   • US:¬  US:*  -  $ r#  r�   r	  s     r6   rf   Útriang_gen._argcheckA'  s   € Ø�Q‘˜1 ™6Ñ"Ð"r8   c                 ó    • [        SSSS5      /$ )Nrj  FrÎ  rÏ  r|  rn   s    r6   ro   Útriang_gen._shape_infoD'  s   € Ü˜3  x°Ó>Ð?Ð?r8   c                 óZ   • [        US:H  X:  X:¬  US:g  -  US:H  /S S S S /X45      nU$ )Nr   r   c                 ó   • SSU -  -
  $ rD  r�   rô  s     r6   r  Ú!triang_gen._pdf.<locals>.<lambda>Q'  s   €  a¨!¨a©%¢ir8   c                 ó   • SU -  U-  $ rD  r�   rô  s     r6   r  rý  R'  s   €  a¨!¡e¨a¢ir8   c                 ó   • SSU -
  -  SU-
  -  $ r  r�   rô  s     r6   r  rý  S'  s   €  a¨1¨q©5¡k°Q¸±UÒ&;r8   c                 ó   • SU -  $ rD  r�   rô  s     r6   r  rý  T'  s   €  a¨!¢er8   r   ©rE   rv   rj  rW  s       r6   rw   Útriang_gen._pdfG'  sT   € ô ˜˜a™Ø™Ø™& Q¨!¡VÑ,Ø˜a™ð!ñ 0Ù/Ù;Ù+ð-ð ˜ó ˆð ˆr8   c                 óZ   • [        US:H  X:  X:¬  US:g  -  US:H  /S S S S /X45      nU$ )Nr   r   c                 ó   • SU -  X -  -
  $ rD  r�   rô  s     r6   r  Ú!triang_gen._cdf.<locals>.<lambda>]'  s   €  a¨¡c¨A©C¢ir8   c                 ó   • X -  U-  $ rO   r�   rô  s     r6   r  r  ^'  s
   €  a¡e¨a¢ir8   c                 ó(   • X -  SU -  -
  U-   US-
  -  $ r  r�   rô  s     r6   r  r  _'  s   €  q¡s¨Q¨q©S¡y°1¡}¸¸1¹Ò&=r8   c                 ó
   • X -  $ rO   r�   rô  s     r6   r  r  `'  s   €  a¢er8   r   r  s       r6   r{   Útriang_gen._cdfX'  sR   € Ü˜˜a™Ø™Ø™& Q¨!¡VÑ,Ø˜a™ð!ñ 0Ù/Ù=Ù+ð-ð ˜ó ˆð ˆr8   c           
      ó¢   • [         R                  " X:  [         R                  " X!-  5      S[         R                  " SU-
  SU-
  -  5      -
  5      $ ra   )rQ   rÃ  r&  ru  s      r6   r†   Útriang_gen._ppfd'  s;   € Ü�xŠx˜™œrŸwšw q¡u›~¨q´·²¸!¸A¹#À!ÀAÁ#¹Ó1GÑ/GÓHÐHr8   c           	      óÈ   • US-   S-  SU-
  X-  -   S-  [         R                  " S5      SU-  S-
  -  US-   -  US-
  -  S[         R                  " SU-
  X-  -   S5      -  -  S4$ )	Nr•   r·  é   rW   r   r¶  rg  g333333ã¿)rQ   r&  ri  r	  s     r6   r   Útriang_gen._statsg'  st   € Ø�3‘˜‘Ø�Q‘�q‘s‘˜B‘Ü—’˜“
˜A˜a™C ™EÑ" A a¡CÑ(¨!¨A©#Ñ.°!´B·H²H¸cÀ!¹eÀAÁC¹iÈ#Ó4NÑ2NÑOØðð 	r8   c                 ó4   • S[         R                  " S5      -
  $ rT  rg  r	  s     r6   r  Útriang_gen._entropym'  s   € Ø”2—6’6˜!“9‰}Ðr8   r�   r-  )rŽ   r�   r�   r‘   r’   rõ   rf   ro   rw   r{   r†   r   r  r“   r�   r8   r6   ró  ró  ('  s1   † ñô*6ò#ò@òò"
òIòõr8   ró  Útriangc                   ób   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rU 4S jrS rSrU =r$ )Útruncexpon_genit'  a8  A truncated exponential continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `truncexpon` is:

.. math::

    f(x, b) = \frac{\exp(-x)}{1 - \exp(-b)}

for :math:`0 <= x <= b`.

`truncexpon` takes ``b`` as a shape parameter for :math:`b`.

%(after_notes)s

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r®  rl   rn   s    r6   ro   Útruncexpon_gen._shape_infoŠ'  r5  r8   c                 ó   • U R                   U4$ rO   r¾  rë  s     r6   r¥   Útruncexpon_gen._get_support�'  ó   € Ø�v‰v�qˆyÐr8   c                 ób   • [         R                  " U* 5      [        R                  " U* 5      * -  $ rO   r¼  r±  s      r6   rw   Útruncexpon_gen._pdf�'  s#   € ä�vŠv�q�b‹zœBŸHšH a R›L˜=Ñ)Ð)r8   c                 ób   • U* [         R                  " [        R                  " U* 5      * 5      -
  $ rO   r(  r±  s      r6   rü   Útruncexpon_gen._logpdf”'  s$   € Øˆr”B—F’FœBŸHšH a R›L˜=Ó)Ñ)Ð)r8   c                 ó`   • [         R                  " U* 5      [         R                  " U* 5      -  $ rO   rV  r±  s      r6   r{   Útruncexpon_gen._cdf—'  s!   € Ü�xŠx˜˜‹|œBŸHšH a R›LÑ(Ð(r8   c                 ó`   • [         R                  " U[         R                  " U* 5      -  5      * $ rO   )r~   rï  rt  rÄ  s      r6   r†   Útruncexpon_gen._ppfš'  s"   € Ü—’˜œ2Ÿ8š8 Q B›<™Ó(Ð(Ð(r8   c                 ó�   • [         R                  " U* 5      [         R                  " U* 5      -
  [        R                  " U* 5      -  $ rO   r¼  r±  s      r6   r€   Útruncexpon_gen._sf�'  s0   € Ü—’˜�r“
œRŸVšV Q B›ZÑ'¬¯ª°1°"«Ñ5Ð5r8   c                 ó�   • [         R                  " [         R                  " U* 5      U[        R                  " U* 5      -  -
  5      * $ rO   )rQ   r  rÒ   r~   rt  rÄ  s      r6   rŠ   Útruncexpon_gen._isf '  s2   € Ü—’”r—v’v˜q˜b“z A¬¯ª°!°«Ñ$4Ñ4Ó5Ð5Ð5r8   c                 ó:  >• US:X  a9  SUS-   [         R                  " U* 5      -  -
  [        R                  " U* 5      * -  $ US:X  aG  SSSX"-  SU-  -   S-   -  [         R                  " U* 5      -  -
  -  [        R                  " U* 5      * -  $ [        TU ]  X5      $ rŒ	  )rQ   rÒ   r~   rt  rA   r+  )rE   re   r˜   rÞ  s      €r6   r+  Útruncexpon_gen._munp£'  s•   ø€ ð �‹6Ø�q˜‘sœBŸFšF A 2›JÑ&Ñ&¬"¯(ª(°A°2«,¨Ñ7Ð7Ø�!‹VØ�a˜˜Q™S  1¡™W Q™Y™¬¯ª°¨r«
Ñ2Ñ2Ñ3´b·h²hÀ¸r³l°]ÑCÐCô ‘7‘= Ó&Ð&r8   c                 ó‚   • [         R                  " U5      n[         R                  " US-
  5      SX!S-
  -  -   SU-
  -  -   $ rµ  rø  )rE   r˜   ÚeBs      r6   r  Útruncexpon_gen._entropy®'  s9   € Ü�VŠV�A‹YˆÜ�vŠv�b˜‘d‹|˜Q˜r S¡5™z™\¨C°©FÑ3Ñ3Ð3r8   r�   )rŽ   r�   r�   r‘   r’   ro   r¥   rw   rü   r{   r†   r€   rŠ   r+  r  r“   r-  r.  s   @r6   r  r  t'  s@   ø† ñò*Eòò*ò*ò)ò)ò6ò6õ	'÷4ð 4r8   r  Ú
truncexpon)r”   r˜   c                 ó.   • [         R                  " X/SS9$ )Nr   r]  )r~   r  ©Úlog_pÚlog_qs     r6   Ú_log_sumr/  ¸'  s   € Ü�<Š<˜˜¨QÑ/Ð/r8   c                 óV   • [         R                  " X[        R                  S-  -   /SS9$ )Nù              ð?r   r]  )r~   r  rQ   r  r,  s     r6   rû  rû  ½'  s"   € Ü�<Š<˜¤b§e¡e¨B¡h¡Ð/°aÑ8Ð8r8   c                 óÆ  ^• [         R                  " X5      u  pUS:*  nU S:„  nX#-  ) nS mU4S jnS n[         R                  " U [         R                  [         R                  S9nX   R
                  (       a  T" X   X   5      Xr'   X   R
                  (       a  U" X   X   5      Xs'   X   R
                  (       a  U" X   X   5      Xt'   [         R                  " U5      $ )z3Log of Gaussian probability mass within an intervalr   c                 ó>   • [        [        U5      [        U 5      5      $ rO   )rû  rÞ   rø  s     r6   Úmass_case_leftÚ'_log_gauss_mass.<locals>.mass_case_leftË'  s   € Üœ a›¬,°q«/Ó:Ð:r8   c                 ó   >• T" U* U * 5      $ rO   r�   )r—   r˜   r4  s     €r6   Úmass_case_rightÚ(_log_gauss_mass.<locals>.mass_case_rightÎ'  s   ø€ Ù˜q˜b 1 "Ó%Ð%r8   c                 ó\   • [         R                  " [        U 5      * [        U* 5      -
  5      $ rO   )r~   rï  rÛ   rø  s     r6   Úmass_case_centralÚ*_log_gauss_mass.<locals>.mass_case_centralÑ'  s$   € ô �xŠxœ 1›˜¬	°1°"«Ñ5Ó6Ð6r8   )r   r4	  )rQ   rS  r6	  rF  Ú
complex128ró   r.  )	r—   r˜   Ú	case_leftÚ
case_rightÚcase_centralr7  r:  rX  r4  s	           @r6   Ú_log_gauss_massr@  Á'  sÅ   ø€ ä×Ò˜qÓ$�D€Að �Q‘€IØ�Q‘€JØÑ+Ð,€Lò;õ&ò7ô �,Š,�q¤R§V¡V´2·=±=Ñ
A€CØ�|××Ù'¨©°a±lÓCˆ‰Ø�}××Ù)¨!©-¸¹ÓGˆ‰Ø�××Ù-¨a©o¸q¹ÓOˆÑÜ�7Š7�3‹<Ðr8   c                   ó„   ^ • \ rS rSrSrS rS rU 4S jrS rS r	S r
S	 rS
 rS rS rS rS rS rS rSS jrSrU =r$ )Útruncnorm_genié'  a¯	  A truncated normal continuous random variable.

%(before_notes)s

Notes
-----
This distribution is the normal distribution centered on ``loc`` (default
0), with standard deviation ``scale`` (default 1), and truncated at ``a``
and ``b`` *standard deviations* from ``loc``. For arbitrary ``loc`` and
``scale``, ``a`` and ``b`` are *not* the abscissae at which the shifted
and scaled distribution is truncated.

.. note::
    If ``a_trunc`` and ``b_trunc`` are the abscissae at which we wish
    to truncate the distribution (as opposed to the number of standard
    deviations from ``loc``), then we can calculate the distribution
    parameters ``a`` and ``b`` as follows::

        a, b = (a_trunc - loc) / scale, (b_trunc - loc) / scale

    This is a common point of confusion. For additional clarification,
    please see the example below.

%(example)s

In the examples above, ``loc=0`` and ``scale=1``, so the plot is truncated
at ``a`` on the left and ``b`` on the right. However, suppose we were to
produce the same histogram with ``loc = 1`` and ``scale=0.5``.

>>> loc, scale = 1, 0.5
>>> rv = truncnorm(a, b, loc=loc, scale=scale)
>>> x = np.linspace(truncnorm.ppf(0.01, a, b),
...                 truncnorm.ppf(0.99, a, b), 100)
>>> r = rv.rvs(size=1000)

>>> fig, ax = plt.subplots(1, 1)
>>> ax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')
>>> ax.hist(r, density=True, bins='auto', histtype='stepfilled', alpha=0.2)
>>> ax.set_xlim(a, b)
>>> ax.legend(loc='best', frameon=False)
>>> plt.show()

Note that the distribution is no longer appears to be truncated at
abscissae ``a`` and ``b``. That is because the *standard* normal
distribution is first truncated at ``a`` and ``b``, *then* the resulting
distribution is scaled by ``scale`` and shifted by ``loc``. If we instead
want the shifted and scaled distribution to be truncated at ``a`` and
``b``, we need to transform these values before passing them as the
distribution parameters.

>>> a_transformed, b_transformed = (a - loc) / scale, (b - loc) / scale
>>> rv = truncnorm(a_transformed, b_transformed, loc=loc, scale=scale)
>>> x = np.linspace(truncnorm.ppf(0.01, a, b),
...                 truncnorm.ppf(0.99, a, b), 100)
>>> r = rv.rvs(size=10000)

>>> fig, ax = plt.subplots(1, 1)
>>> ax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')
>>> ax.hist(r, density=True, bins='auto', histtype='stepfilled', alpha=0.2)
>>> ax.set_xlim(a-0.1, b+0.1)
>>> ax.legend(loc='best', frameon=False)
>>> plt.show()
c                 ó
   • X:  $ rO   r�   r>	  s      r6   rf   Útruncnorm_gen._argcheck*(  s	   € Ø‰uˆr8   c                 ó¼   • [        SS[        R                  * [        R                  4S5      n[        SS[        R                  * [        R                  4S5      nX/$ )Nr—   Frk   r˜   )FTrl   r¦  s      r6   ro   Útruncnorm_gen._shape_info-(  sG   € Ü˜˜U¤b§f¡f W¬b¯f©fÐ$5°}ÓEˆÜ˜˜U¤b§f¡f W¬b¯f©fÐ$5°}ÓEˆØˆxˆr8   c                 ó¾   >• [        U[        5      (       a  UR                  5       n[        TU ]  U[
        R                  " U5      [
        R                  " U5      4S9$ rì  rí  r€  s     €r6   rÝ  Útruncnorm_gen._fitstart2(  sF   ø€ ä�dœL×)Ñ)Ø—>‘>Ó#ˆDÜ‰wÑ  ¬R¯VªV°D«\¼2¿6º6À$»<Ð,HÐ ÐIÐIr8   c                 ó   • X4$ rO   r�   r>	  s      r6   r¥   Útruncnorm_gen._get_support8(  r„  r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r<  r´  s       r6   rw   Útruncnorm_gen._pdf;(  rî  r8   c                 ó0   • [        U5      [        X#5      -
  $ rO   )rØ   r@  r´  s       r6   rü   Útruncnorm_gen._logpdf>(  s   € Ü˜A‹¤°Ó!6Ñ6Ð6r8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r  r´  s       r6   r{   Útruncnorm_gen._cdfA(  rî  r8   c           
      óX  • [         R                  " XU5      u  pn[         R                  " [        X!5      [        X#5      -
  5      nUS:„  n[         R                  " U5      (       aD  [         R
                  " [         R                  " U R                  X   X%   X5   5      5      * 5      XE'   U$ ©Ngš™™™™™¹¿)rQ   rS  r"  r@  rì  rï  rÒ   r	  )rE   rv   r—   r˜   Úlogcdfra  s         r6   r  Útruncnorm_gen._logcdfD(  s   € Ü×%Ò% a¨AÓ.‰ˆˆaÜ—’œO¨AÓ1´OÀAÓ4IÑIÓJˆØ�T‰MˆÜ�6Š6�!�9‰9ÜŸš¤"§&¢&¨¯©°Q±T¸1¹4ÀÁÓ)FÓ"GÐ!GÓHˆF‰IØˆr8   c                 óN   • [         R                  " U R                  XU5      5      $ rO   r¥  r´  s       r6   r€   Útruncnorm_gen._sfL(  r§  r8   c           
      óX  • [         R                  " XU5      u  pn[         R                  " [        X5      [        X#5      -
  5      nUS:„  n[         R                  " U5      (       aD  [         R
                  " [         R                  " U R                  X   X%   X5   5      5      * 5      XE'   U$ rR  )rQ   rS  r"  r@  rì  rï  rÒ   r  )rE   rv   r—   r˜   Úlogsfra  s         r6   r	  Útruncnorm_gen._logsfO(  s   € Ü×%Ò% a¨AÓ.‰ˆˆaÜ—
’
œ?¨1Ó0´?À1Ó3HÑHÓIˆØ�D‰LˆÜ�6Š6�!�9‰9Ü—x’x¤§¢¨¯©°Q±T¸1¹4ÀÁÓ(FÓ!GÐ GÓHˆE‰HØˆr8   c                 ó&  • [        U5      n[        U5      nXC-
  n[        R                  " [        R                  " S[        R                  -  [        R
                  -  5      U-  5      nU[        U5      -  U[        U5      -  -
  SU-  -  nXg-   nU$ rD  )rÛ   rQ   r  r&  r  r2  rÕ   )	rE   r—   r˜   r
  r  rü  r.  ÚDrž  s	            r6   r  Útruncnorm_gen._entropyW(  sy   € Ü�a‹LˆÜ�a‹LˆØ‰EˆÜ�FŠF”2—7’7˜1œrŸu™u™9¤r§t¡tÑ+Ó,¨qÑ0Ó1ˆØ”˜1“Ñ ¤I¨a£LÑ 0Ñ0°Q¸±UÑ;ˆØ‰EˆØˆr8   c                 ó  • [         R                  " XU5      u  pnUS:  nU) nS nS n[         R                  " U5      nX   n	X   n
U	R                  (       a  U" X’U   X4   5      X„'   U
R                  (       a  U" X¢U   X5   5      X…'   U$ )Nr   c                 ó˜   • [        [        U5      [        R                  " U 5      [	        X5      -   5      n[
        R                  " U5      $ rO   )r/  rÞ   rQ   r  r@  r~   Ú	ndtri_exp©r…   r—   r˜   Ú	log_Phi_xs       r6   Úppf_leftÚ$truncnorm_gen._ppf.<locals>.ppf_leftf(  s7   € Ü ¤¨a£Ü!#§¢¨£¬_¸QÓ-BÑ!BóDˆIä—<’< 	Ó*Ð*r8   c                 óž   • [        [        U* 5      [        R                  " U * 5      [	        X5      -   5      n[
        R                  " U5      * $ rO   )r/  rÞ   rQ   rï  r@  r~   r_  r`  s       r6   Ú	ppf_rightÚ%truncnorm_gen._ppf.<locals>.ppf_rightk(  s?   € Ü ¤¨q¨bÓ!1Ü!#§¢¨1¨"£´ÀÓ0EÑ!EóGˆIä—L’L Ó+Ð+Ð+r8   ©rQ   rS  Ú
empty_likeró   )rE   r…   r—   r˜   r=  r>  rb  re  rX  Úq_leftÚq_rights              r6   r†   Útruncnorm_gen._ppf`(  s‹   € Ü×%Ò% a¨AÓ.‰ˆˆaà˜‘Eˆ	Ø�Zˆ
ò	+ò
	,ô
 �mŠm˜AÓˆà‘ˆØ‘-ˆà�;�;Ù% f°	©l¸A¹LÓIˆC‰NØ�<�<Ù'¨°:±ÀÁÓNˆC‰Oàˆ
r8   c                 ó  • [         R                  " XU5      u  pnUS:  nU) nS nS n[         R                  " U5      nX   n	X   n
U	R                  (       a  U" X’U   X4   5      X„'   U
R                  (       a  U" X¢U   X5   5      X…'   U$ )Nr   c                 óÀ   • [        [        U5      [        R                  " U 5      [	        X5      -   5      n[
        R                  " [        R                  " U5      5      $ rO   )rû  rÞ   rQ   r  r@  r~   r_  r.  r`  s       r6   Úisf_leftÚ$truncnorm_gen._isf.<locals>.isf_leftƒ(  s@   € Ü!¤,¨q£/Ü"$§&¢&¨£)¬o¸aÓ.CÑ"CóEˆIä—<’<¤§¢¨	Ó 2Ó3Ð3r8   c                 óÆ   • [        [        U* 5      [        R                  " U * 5      [	        X5      -   5      n[
        R                  " [        R                  " U5      5      * $ rO   )rû  rÞ   rQ   rï  r@  r~   r_  r.  r`  s       r6   Ú	isf_rightÚ%truncnorm_gen._isf.<locals>.isf_rightˆ(  sH   € Ü!¤,°¨rÓ"2Ü"$§(¢(¨A¨2£,´ÀÓ1FÑ"FóHˆIä—L’L¤§¢¨Ó!3Ó4Ð4Ð4r8   rg  )rE   r…   r—   r˜   r=  r>  rn  rq  rX  ri  rj  s              r6   rŠ   Útruncnorm_gen._isf|(  s‹   € ä×%Ò% a¨AÓ.‰ˆˆaà˜‘Eˆ	Ø�Zˆ
ò	4ò
	5ô
 �mŠm˜AÓˆà‘ˆØ‘-ˆà�;�;Ù% f°	©l¸A¹LÓIˆC‰NØ�<�<Ù'¨°:±ÀÁÓNˆC‰Oàˆ
r8   c           	      ó¼   ^ • U 4S jn[         R                  " US:¬  X":H  -  X3:H  -  XU4[        R                  " U[        R                  /S9[        R
                  S9$ )Nc                 ór  >^• [         R                  " X/5      nTR                  X1U5      u  pE[         R                  " XE* /5      nUS:g  nSS/n[        SU S-   5       HR  m[        R
                  " XvU4U4S jSS9n	[         R                  " U	5      TS-
  US   -  -   n
UR                  U
5        MT     US   $ )z_
Returns n-th moment. Defined only if n >= 0.
Function cannot broadcast due to the loop over n
r   r   c                 ó   >• XTS-
  -  -  $ ra   r�   )rv   r�  rz  s     €r6   r  Ú:truncnorm_gen._munp.<locals>.n_th_moment.<locals>.<lambda>ª(  s   ø€ °A¸A¸a¹C¹²Lr8   r  r;  r  )rQ   r"  rw   r`  r#  r$  rî  rK	  )re   r—   r˜   ÚabÚpAÚpBÚprobsÚcondr}  rŽ  Úmkrz  rE   s              @€r6   Ún_th_momentÚ(truncnorm_gen._munp.<locals>.n_th_momentš(  s´   ù€ ô
 —’˜Q˜FÓ#ˆBØ—Y‘Y˜r aÓ(‰FˆBÜ—J’J  C˜yÓ)ˆEØ˜A‘:ˆDØ˜!�fˆGÜ˜1˜a ™c–]�ô
 —’ t°R¨[Ü'@Ø23ñ5�ô —V’V˜D“\ Q q¡S¨G°B©KÑ$7Ñ7�Ø—‘˜rÖ"ñ #ð ˜2‘;Ðr8   r   r@  r  rœ	  )rE   re   r—   r˜   r~  s   `    r6   r+  Útruncnorm_gen._munp™(  sP   ø€ õ	ô, �Š  Q¡¨1©6Ñ2°a±fÑ=ÀÀa¸yÜ!Ÿ|š|¨KÄÇÁÀÑMÜ*,¯&©&ñ2ð 	2r8   c                 ó˜   • U R                  [        R                  " X/5      X5      u  pES n[        R                  " U5      nU" XXE5      $ )Nc                 óÈ  • [         R                  " X/5      nX#-
  nUn[         R                  " X#* /5      nUS:g  n[        R                  " X‡U4S SS9n	S[         R                  " U	5      -   n
[        R                  " X‡XF-
  4S SS9n	S[         R                  " U	5      -   n[        R                  " X‡U4S SS9n	SU-  [         R                  " U	5      -   n[        R                  " X‡U4S SS9n	S	U
-  [         R                  " U	5      -   nXÅS
U
-  SUS-  -  -   -  -   nU[         R
                  " US5      -  nXÕSU-  S	U-  SU
-  US-  -
  -  -   -  -   nUUS-  -  S	-
  nXkUU4$ )Nr   c                 ó
   • X-  $ rO   r�   r�  s     r6   r  ÚGtruncnorm_gen._stats.<locals>._truncnorm_stats_scalar.<locals>.<lambda>¾(  s   € À1Â3r8   r  r   c                 ó
   • X-  $ rO   r�   r�  s     r6   r  r„  Á(  s   € ÈÊr8   c                 ó   • XS-  -  $ rD  r�   r�  s     r6   r  r„  Æ(  ó
   € À1ÈÁTÂ6r8   rW   c                 ó   • XS-  -  $ rn  r�   r�  s     r6   r  r„  É(  r‡  r8   rÌ  rs  rg  rt  )rQ   r"  r#  r$  rî  ri  )r—   r˜   ry  rz  rx  rÌ  r}  r{  r|  rŽ  rÍ  r~  rÎ  Úm4Úmu3r  Úmu4r€  s                     r6   Ú_truncnorm_stats_scalarÚ5truncnorm_gen._stats.<locals>._truncnorm_stats_scalar·(  sq  € Ü—’˜Q˜FÓ#ˆBØ‘ˆBØˆBä—J’J  C˜yÓ)ˆEØ˜A‘:ˆDÜ—?’? 4°¨Ñ6FØ./ñ1ˆDà”R—V’V˜D“\Ñ!ˆBÜ—?’? 4°±Ð)9Ñ;KØ./ñ1ˆDð ”b—f’f˜T“lÑ"ˆCÜ—?’? 4°¨Ñ6IØ./ñ1ˆDà�2‘œŸš˜t›Ñ$ˆBÜ—?’? 4°¨Ñ6IØ./ñ1ˆDà�2‘œŸš˜t›Ñ$ˆBà˜R ™U Q r¨1¡u¡W™_Ñ-Ñ-ˆCØ”r—x’x  SÓ)Ñ)ˆBØ˜2˜b™5 1 R¡4¨¨2©°°A±©Ñ#6Ñ6Ñ7Ñ7ˆCØ�s˜A‘v‘ Ñ!ˆBØ˜B �?Ð"r8   )ÚpdfrQ   rI  r7  )rE   r—   r˜   r}  ry  rz  rŒ  Ú_truncnorm_statss           r6   r   Útruncnorm_gen._stats´(  sC   € Ø—‘œ"Ÿ(š( A 6Ó*¨AÓ1‰ˆò	#ô8 Ÿ<š<Ð(?Ó@ÐÙ  bÓ-Ð-r8   r�   r‚  )rŽ   r�   r�   r‘   r’   rf   ro   rÝ  r¥   rw   rü   r{   r  r€   r	  r  r†   rŠ   r+  r   r“   r-  r.  s   @r6   rB  rB  é'  sZ   ø† ñ>ò@òõ
Jòò-ò7ò-òò,òòòò8ò:2÷6 .ò  .r8   rB  Ú	truncnorm)r™   r·   c                   óÄ   ^ • \ rS rSrSrS rS rS rS rU 4S jr	S r
S	 rU 4S
 jrS rS rS rU 4S jrS rS rS rS rS r\\" \5      U 4S j5       5       rSrU =r$ )Útruncpareto_geniÛ(  a'  An upper truncated Pareto continuous random variable.

%(before_notes)s

See Also
--------
pareto : Pareto distribution

Notes
-----
The probability density function for `truncpareto` is:

.. math::

    f(x, b, c) = \frac{b}{1 - c^{-b}} \frac{1}{x^{b+1}}

for :math:`b \neq 0`, :math:`c > 1` and :math:`1 \le x \le c`.

`truncpareto` takes `b` and `c` as shape parameters for :math:`b` and
:math:`c`.

Notice that the upper truncation value :math:`c` is defined in
standardized form so that random values of an unscaled, unshifted variable
are within the range ``[1, c]``.
If ``u_r`` is the upper bound to a scaled and/or shifted variable,
then ``c = (u_r - loc) / scale``. In other words, the support of the
distribution becomes ``(scale + loc) <= x <= (c*scale + loc)`` when
`scale` and/or `loc` are provided.

The ``fit`` method assumes that :math:`b` is positive; it does not produce
good results when the data is more consistent with negative :math:`b`.

`truncpareto` can also be used to model a general power law distribution
with PDF:

.. math::

    f(x; a, l, h) = \frac{a}{h^a - l^a} x^{a-1}

for :math:`a \neq 0` and :math:`0 < l < x < h`. Suppose :math:`a`,
:math:`l`, and :math:`h` are represented in code as ``a``, ``l``, and
``h``, respectively. In this case, use `truncpareto` with parameters
``b = -a``, ``c = h / l``, ``scale = l``, and ``loc = 0``.

%(after_notes)s

References
----------
.. [1] Burroughs, S. M., and Tebbens S. F.
    "Upper-truncated power laws in natural systems."
    Pure and Applied Geophysics 158.4 (2001): 741-757.

%(example)s

c                 óž   • [        SS[        R                  * [        R                  4S5      n[        SSS[        R                  4S5      nX/$ )Nr˜   Fr3  rj  r•   rl   )rE   r¨  rŠ  s      r6   ro   Útruncpareto_gen._shape_info)  s@   € Ü˜˜U¤b§f¡f W¬b¯f©fÐ$5°~ÓFˆÜ˜˜U S¬"¯&©& M°>ÓBˆØˆxˆr8   c                 ó   • US:g  US:„  -  $ r   r�   ©rE   r˜   rj  s      r6   rf   Útruncpareto_gen._argcheck)  s   € Ø�R‘˜A ™FÑ#Ð#r8   c                 ó   • U R                   U4$ rO   r¾  r—  s      r6   r¥   Útruncpareto_gen._get_support)  r  r8   c                 óT   • [        XUS[        S9u  pnX!US-   * -  -  SSX2-  -  -
  -  $ ©NT©Úforce_floatingÚxpr   ©r   rQ   ©rE   rv   r˜   rj  s       r6   rw   Útruncpareto_gen._pdf)  s7   € ä˜Q 1°T¼bÑA‰ˆˆaØ˜˜!™�f‘9‰}  A a¡d¡F¡
Ñ+Ð+r8   c                 óŠ   >• [        XUS[        S9u  pn[        R                  " US:„  XU4U R                  [
        TU ]  5      $ ©NTr�  r   )r   rQ   r#  r$  Ú_logpdf_pos_brA   rü   ©rE   rv   r˜   rj  rÞ  s       €r6   rü   Útruncpareto_gen._logpdf$)  ó>   ø€ Ü˜Q 1°T¼bÑA‰ˆˆaÜ�Š˜q 1™u q¨Q i°×1CÑ1CÄUÁWÁ_ÓUÐUr8   c           	      óð   • [         R                  " U5      [         R                  " [         R                  " U* [         R                  " U5      -  5      * 5      -
  US-   [         R                  " U5      -  -
  $ ra   )rQ   r  rt  r¡  s       r6   r¥  Útruncpareto_gen._logpdf_pos_b()  sM   € Ü�vŠv�a‹yœ2Ÿ6š6¤2§8¢8¨Q¨B¬r¯vªv°a«y©LÓ#9Ð"9Ó:Ñ:¸aÀ¹cÄ2Ç6Â6È!Ã9¹_ÑLÐLr8   c                 óN   • [        XUS[        S9u  pnSX* -  -
  SSX2-  -  -
  -  $ rœ  r   r¡  s       r6   r{   Útruncpareto_gen._cdf+)  s3   € Ü˜Q 1°T¼bÑA‰ˆˆaØ�A�r‘E‘	˜a ! A¡D¡&™jÑ)Ð)r8   c                 óŠ   >• [        XUS[        S9u  pn[        R                  " US:„  XU4U R                  [
        TU ]  5      $ r¤  )r   rQ   r#  r$  Ú_logcdf_pos_brA   r  r¦  s       €r6   r  Útruncpareto_gen._logcdf/)  r¨  r8   c                 ón   • [         R                  " X* -  * 5      [         R                  " SX2-  -  5      -
  $ rw	  r©  r¡  s       r6   r®  Útruncpareto_gen._logcdf_pos_b3)  s+   € Ü�xŠx˜˜B™˜Ó¤"§(¢(¨2¨a©d©7Ó"3Ñ3Ð3r8   c                 ób   • [        XUS[        S9u  pn[        SSSX2-  -  -
  U-  -
  SU-  5      $ ©NTr�  r   r  ©r   rQ   rÃ  ©rE   r…   r˜   rj  s       r6   r†   Útruncpareto_gen._ppf6)  s:   € Ü˜Q 1°T¼bÑA‰ˆˆaÜ�1˜˜A˜a™d™F™
 A‘~Ñ% r¨!¡tÓ,Ð,r8   c                 óX   • [        XUS[        S9u  pnX* -  SX2-  -  -
  SSX2-  -  -
  -  $ rœ  r   r¡  s       r6   r€   Útruncpareto_gen._sf:)  s9   € Ü˜Q 1°T¼bÑA‰ˆˆaØ�2‘˜˜!™$™‘ 1 q¨©¡v¡:Ñ.Ð.r8   c                 óŠ   >• [        XUS[        S9u  pn[        R                  " US:„  XU4U R                  [
        TU ]  5      $ r¤  )r   rQ   r#  r$  Ú_logsf_pos_brA   r	  r¦  s       €r6   r	  Útruncpareto_gen._logsf>)  s>   ø€ Ü˜Q 1°T¼bÑA‰ˆˆaÜ�Š˜q 1™u q¨Q i°×1BÑ1BÄEÁGÁNÓSÐSr8   c                 ó|   • [         R                  " X* -  SX2-  -  -
  5      [         R                  " SX2-  -  5      -
  $ )Nr   r  r¨  r¡  s       r6   rº  Útruncpareto_gen._logsf_pos_bB)  s3   € Ü�vŠv�a˜‘e˜a ¡™f‘nÓ%¬¯ª°°A±D±Ó(9Ñ9Ð9r8   c                 ól   • [        XUS[        S9u  pn[        SX2-  -  SSX2-  -  -
  U-  -   SU-  5      $ r³  r´  rµ  s       r6   rŠ   Útruncpareto_gen._isfE)  s@   € Ü˜Q 1°T¼bÑA‰ˆˆaÜ�1�Q‘T‘6˜Q  1¡4¡™Z¨™NÑ*¨B¨q©DÓ1Ð1r8   c                 óœ   • [         R                  " USSX!-  -  -
  -  5      US-   [         R                  " U5      X!-  S-
  -  SU-  -
  -  -   * $ ra   rg  r—  s      r6   r  Útruncpareto_gen._entropyI)  sS   € Ü—’˜˜1˜q ¡™v™:™Ó'Ø�a‘Cœ"Ÿ&š& ›) Q¡T¨A¡XÑ.°°1±Ñ4Ñ5ñ6ð 7ð 	7r8   c                 óÐ   • [        XUS[        S9u  pnX:H  R                  5       (       a$  U[        R                  " U5      -  SSX2-  -  -
  -  $ X"U-
  -  X2-  X1-  -
  -  X2-  S-
  -  $ rœ  )r   rQ   r$  r  )rE   re   r˜   rj  s       r6   r+  Útruncpareto_gen._munpM)  sh   € Ü˜Q 1°T¼bÑA‰ˆˆaØ‰F�<‰<�>‰>Ø”R—V’V˜A“Y‘; ! a¨©¡f¡*Ñ-Ð-à˜!™‘9 ¡ q¡t¡Ñ,°±°q±Ñ9Ð9r8   c                 ó¦   • [        U[        5      (       a  UR                  5       n[        R	                  U5      u  p#n[        U5      U-
  U-  nX%X44$ rO   )r?   r*   rÛ  rï  rC   rQ  )rE   rF   r˜   r.   r/   rj  s         r6   rÝ  Útruncpareto_gen._fitstartT)  sJ   € Ü�dœL×)Ñ)Ø—>‘>Ó#ˆDÜŸ
™
 4Ó(‰ˆ�Ü�‹Y˜‰_˜eÑ#ˆØ�SÐÐr8   c                 ó¢  >^ ^^^ ^!^"^#^$^%• UR                  SS5      (       a  [        T&T ]  " T/UQ70 UD6$ S m#S m"UU"U#4S jmU%4S jm U$U%4S jnU$4S jm!SUUU U!U"4S	 jjnS
 nU&U 4S jn[        T TX#5      nUu  mpšp¼TR	                  5       TR                  5       sm$m%[        R                  " T$[        R                  * 5      nU	b  U
b  Ub  Ub  [        S5      eU
Gc  UGc  UGc  U	Gc0  UU U!U"4S jn[        R                  " T$[        R                  * 5      nUnSnUS-
  nU[        R                  * :”  a`  U" U5      U" U5      -  S:¼  aK  US-  nU[        R                  " SU5      -
  nU[        R                  * :”  a  U" U5      U" U5      -  S:¼  a  MK  U[        R                  * :”  d  U" T/UQ70 UD6$ [        UUU4S9nUR                  (       d  U" T/UQ70 UD6$ UR                  S-
  nUS-
  nSnU[        R                  * :”  a`  U" U5      U" U5      -  S:¼  aK  US-  nU[        R                  " SU5      -
  nU[        R                  * :”  a  U" U5      U" U5      -  S:¼  a  MK  U[        R                  * :”  d  U" T/UQ70 UD6$ [        UUU4S9nUR                  (       d  U" T/UQ70 UD6$ UR                  nT!" U5      nT " UU5      nT" UUU5      nTU-
  U-  n[	        ST#" U5      -  ST"" U5      S-
  -  5      nUU:  d  U" T/UQ70 UD6$ GOUnUS-
  nSnU[        R                  * :”  aP  U" UU	5      U" Xù5      -  S:¼  a:  US-  nUSU-  -
  nU[        R                  * :”  a  U" UU	5      U" Xù5      -  S:¼  a  M:  U[        R                  * :”  d  U" T/UQ70 UD6$ [        XY4UU4S9nUR                  (       d  U" T/UQ70 UD6$ UR                  nT!" U5      nT " UU5      nU	nGO3Ub  UOU" X¬5      nU=(       d    T!" U5      nU
=(       d	    T " UU5      nUb"  TR	                  5       U-
  S:  a  [        SSUS9eU
(       a5  Ub2  U(       a+  TR                  5       X¬-  U-   :”  a  [        SST " UU5      S9eU	c�  TU-
  U-  nT#" U5      n[        R                  " U5      nSU-  U:  d  U" T/UQ70 UD6$ SU-  SUU-
  -  -   n[        R                  " SU-  S5      n [        UUU4UU4S9nUR                  (       d  U" T/UQ70 UD6$ UR                  nOU	nUU-   T$:  dM  U(       a'  [        R                  " U[        R                  * 5      nOT!" U5      n[        R                  " US5      nUU-  U-   T%:”  d.  T " UU5      n[        R                  " U[        R                  5      n[        R                   " T R#                  UU5      5      (       a  US:”  d  U" T/UQ70 UD6$ UUUU4nUc;  Uc8  U" T/UQ70 UD6nT R%                  UT5      nT R%                  UT5      nUU:  a  U$ U$ ! [         a    Un GN"f = f)Nrb  Fc                 óV   • [         R                  " [         R                  " U 5      5      $ rO   )rQ   r%  r  rÔ   s    r6   Úlog_meanÚ%truncpareto_gen.fit.<locals>.log_meana)  s   € Ü—7’7œ2Ÿ6š6 !›9Ó%Ð%r8   c                 ó:   • S[         R                  " SU -  5      -  $ ra   )rQ   r%  rÔ   s    r6   Ú	harm_meanÚ&truncpareto_gen.fit.<locals>.harm_meand)  s   € Ø”R—W’W˜Q˜q™S“\‘>Ð!r8   c                 ó¦   >• TU-
  U-  nT" U5      nT	" U5      nUS-
  U-  nSUS-
  USSU -  -
  U-  [         R                  " U 5      -  -
  -  -
  U-  $ ra   rg  )
rj  r.   r/   rÌ  Úharm_mÚlog_mÚquotrF   rË  rÈ  s
          €€€r6   Úget_bÚ"truncpareto_gen.fit.<locals>.get_bg)  si   ø€ Ø�c‘˜5Ñ ˆAÙ˜q“\ˆFÙ˜Q“KˆEØ˜1‘H˜eÑ#ˆDØ˜˜a™ D¨A°°!±©G°VÑ+;¼B¿FºFÀ1»IÑ+EÑ$EÑFÑFÈÑMÐMr8   c                 ó   >• TU -
  U-  $ rO   r�   )r.   r/   Úmxs     €r6   Úget_cÚ"truncpareto_gen.fit.<locals>.get_cn)  s   ø€ Ø˜‘H˜eÑ#Ð#r8   c                 óP   >• U(       a  TU-
  nU$ U (       a  U T-  T-
  U S-
  -  nU$ g ra   r�   )rr  r  r.   r"
  rÔ  s      €€r6   Úget_locÚ$truncpareto_gen.fit.<locals>.get_locq)  s7   ø€ ÞØ˜6‘k�Ø�
ÞØ˜"‘u˜r‘z B¨¡FÑ+�Ø�
ð r8   c                 ó   >• TU -
  $ rO   r�   )r.   r"
  s    €r6   r\  Ú&truncpareto_gen.fit.<locals>.get_scaley)  s   ø€ Ø˜‘8ˆOr8   c                 ó¦   >• T	" U 5      nT" X5      nUc	  T" X0U5      OUnT
" TU -
  U-  5      nSSUS-
  X4S-   -  U-
  -  -   SSUS-   -  -
  -  U-  -
  $ ra   r�   )r.   rG  r/   rj  r˜   rÎ  rF   rÑ  rÕ  r\  rË  s         €€€€€r6   r  Ú$truncpareto_gen.fit.<locals>.dL_dLoc)  sv   ø€ ñ ˜c“NˆEÙ�cÓ!ˆAØ(*©
‘�a˜eÔ$¸ˆAÙ  s¡
¨EÑ1Ó2ˆFØ˜˜Q ™U Q¨1©¡X°¡\Ñ2Ñ2°q¸1¸aÀ¹c¹7±{ÑCÀfÑLÑLÐLr8   c                 óN   • U [         R                  " X-  SX-  -
  -  5      U-  -
  $ ra   r©  )r˜   ÚlogcÚlogms      r6   ÚdL_dBÚ"truncpareto_gen.fit.<locals>.dL_dBˆ)  s*   € ð ”r—x’x ¡¨!¨a©f©*Ñ 5Ó6¸Ñ=Ñ=Ð=r8   c                 ó4   >• [         [        T]
  " U /UQ70 UD6$ rO   )rA   r“  rC   )rF   rG   ÚkwargsrÞ  rE   s      €€r6   ÚfallbackÚ%truncpareto_gen.fit.<locals>.fallbackŽ)  s   ø€ äœ¨$Ò3°DÐJ¸4ÒJÀ6ÑJÐJr8   z2All parameters fixed.There is nothing to optimize.c                 ó�   >• T" U 5      nT" X5      nT" TU -
  U-  5      nSSUS-
  -  -   [         R                  " U5      -  U-  S-
  $ ra   rg  )r.   r/   rj  rÎ  rF   rÕ  r\  rË  s       €€€€r6   Úcond_bÚ#truncpareto_gen.fit.<locals>.cond_bŸ)  sR   ø€ á% c›N�EÙ˜cÓ)�AÙ&¨¨s©
°EÑ'9Ó:�FØ  1 Q¡3¡™K¬2¯6ª6°!«9Ñ4°vÑ=ÀÑAÐAr8   r   r   rÑ   r   gü©ñÒMbP?rW   Útruncparetorè  rO   )r3   rA   rC   rp  rk  rQ  rQ   r  rm   r!  ri  r+   r  rq  r‡  r  r$  rf   r  )'rE   rF   rG   r5   rØ  r  rá  rå  r  ræ  rr  r  r  Úmn_infrè  rT   ra  rS   r¾  r.   r/   rj  r˜   Ústd_dataÚ
up_bound_brà  rß  Úparams_overrideÚparams_superÚnllf_overrideÚ
nllf_superrÑ  rÕ  r\  rË  rÈ  r"
  rÔ  rÞ  s'   ``                             @@@@@@@€r6   rC   Útruncpareto_gen.fit[)  s©  ÿù€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ò	&ò	"÷	Nõ	$ö	õ	÷	Mó 	Mò	>ö	Kô 1°°t¸TÓHˆ
Ø%/Ñ"ˆˆb�dØ—‘“˜TŸX™X›ZˆˆˆBÜ—’˜b¤2§6¡6 'Ó*ˆà‰NØ‘NØÑ$ØÑ&Üð =ó >ð >àŠZ˜DšL¨Vª^ØŠz÷Bð Bô Ÿš b¬2¯6©6¨'Ó2�Ø�Ø�Ø !™�Ø¤"§&¡& Ó(Ù" 6›N©6°&«>Ñ9¸QÓ>Ø˜‘F�AØ#¤b§h¢h¨r°1£oÑ5�Fð ¤"§&¡& Ó(Ù" 6›N©6°&«>Ñ9¸QÕ>ð ¤§¡ Ó'Ù# DÐ8¨4Ò8°4Ñ8Ð8Ü! &°6¸6Ð2BÑC�Ø—}—}Ù# DÐ8¨4Ò8°4Ñ8Ð8ð Ÿ™ D™�Ø !™�Ø�Ø¤"§&¡& Ó(Ù# F›O©G°F«OÑ;¸qÓ@Ø˜‘F�AØ#¤b§h¢h¨r°1£oÑ5�Fð ¤"§&¡& Ó(Ù# F›O©G°F«OÑ;¸qÕ@ð ¤§¡ Ó'Ù# DÐ8¨4Ò8°4Ñ8Ð8Ü! '°F¸FÐ3CÑD�Ø—}—}Ù# DÐ8¨4Ò8°4Ñ8Ð8Ø—h‘h�Ù! #›�Ù˜#˜uÓ%�Ù˜!˜S %Ó(�à  3™J¨Ñ-�ä  ¡8¨HÓ#5Ñ!5Ø!"¡I¨hÓ$7¸Ñ$9Ñ!:ó<�
à˜J›Ù# DÐ8¨4Ò8°4Ñ8Ð8ñ 'ð
  �Ø !™�Ø�à¤§¡ Ó'Ù# F¨BÓ/Ù% fÓ1ñ2Ø56ó7à˜‘F�AØ# a¨¡d™]�Fð	 ¤§¡ Ó'Ù# F¨BÓ/Ù% fÓ1ñ2Ø56õ7ð ¤§¡ Ó'Ù# DÐ8¨4Ò8°4Ñ8Ð8Ü! '¨5Ø+1°6Ð*:ñ<�à—}—}Ù# DÐ8¨4Ò8°4Ñ8Ð8Ø—h‘h�Ù! #›�Ù˜#˜uÓ%�Ø’ð Ñ*‘$±¸Ó0CˆCØ×,™i¨›nˆEØ×'‘e˜C Ó'ˆAð Ñ D§H¡H£J°Ñ$5¸Ó$9Ü" =¸ÀÑCÐCö �tÑ'®VØ—8‘8“: ¡	¨DÑ 0Ó0Ü& }¸AÙ-2°3¸Ó->ñ@ð @ð ‰zØ  3™J¨Ñ-�Ù Ó)�Ü—v’v˜a“y�à˜$™ ›Ù# DÐ8¨4Ò8°4Ñ8Ð8à˜4™ ! T¨D¡[¡/Ñ1�ÜŸš a¨¡f¨aÓ0�ðÜ% e¨d°D¨\Ø/5°vÐ.>ñ@�Cð Ÿ=Ÿ=Ù'¨Ð<¨tÒ<°tÑ<Ð<ØŸ™‘Að �ð �c‘	˜RÓÞÜ—l’l 3¬¯©¨Ó0‘á! #›�ÜŸš U¨AÓ.�Ø�%‘˜‘˜rÓ!Ù�c˜5Ó!ˆAÜ—’˜Q¤§¡Ó'ˆAä—’�t—~‘~ a¨Ó+×,Ñ,°%¸!³)Ù˜DÐ0 4Ò0¨4Ñ0Ð0à˜Q  UÐ*ˆØ‰<˜F™Nñ
 $ DÐ8¨4Ò8°4Ñ8ˆLØ ŸI™I o°tÓ<ˆMØŸ™ <°Ó6ˆJØ˜MÓ)Ø#Ð#àÐøôE "ó Ø“Aðús   Ó0+X> ÔX> Ø>YÙYr�   )rŽ   r�   r�   r‘   r’   ro   rf   r¥   rw   rü   r¥  r{   r  r®  r†   r€   r	  rº  rŠ   r  r+  rÝ  rL   r   r   rC   r“   r-  r.  s   @r6   r“  r“  Û(  s…   ø† ñ6òpò
$òò,õ
VòMò*õVò4ò-ò/õTò:ò2ò7ò:ò ð Ù˜MÓ*ôZó +ó öZr8   r“  rê  )r•   rj  c                   ó`   • \ rS rSrSr\R                  rS rS r	S r
S rS rS rS	 rS
 rSrg)Útukeylambda_geni>*  aò  A Tukey-Lamdba continuous random variable.

%(before_notes)s

Notes
-----
A flexible distribution, able to represent and interpolate between the
following distributions:

- Cauchy                (:math:`lambda = -1`)
- logistic              (:math:`lambda = 0`)
- approx Normal         (:math:`lambda = 0.14`)
- uniform from -1 to 1  (:math:`lambda = 1`)

`tukeylambda` takes a real number :math:`lambda` (denoted ``lam``
in the implementation) as a shape parameter.

%(after_notes)s

%(example)s

c                 ó.   • [         R                  " U5      $ rO   rä  ©rE   Úlams     r6   rf   Útukeylambda_gen._argcheckW*  s   € Ü�{Š{˜3ÓÐr8   c                 ó^   • [        SS[        R                  * [        R                  4S5      /$ )Nr÷  Fr3  rl   rn   s    r6   ro   Útukeylambda_gen._shape_infoZ*  s%   € Ü˜5 %¬2¯6©6¨'´2·6±6Ð):¸NÓKÐLÐLr8   c                 ó^   • [         R                  " US:„  US [        R                  S9nU* U4$ )Nr   c                 ó   • SU -  $ ra   r�   )r÷  s    r6   r  Ú.tukeylambda_gen._get_support.<locals>.<lambda>_*  s   € ¨¨#ªr8   r  rc  )rE   r÷  r˜   s      r6   r¥   Útukeylambda_gen._get_support]*  s/   € Ü�OŠO˜C !™G SÙ-Ü')§v¡vñ/ˆð ˆr�1ˆuˆr8   c           	      ó¶  • [         R                  " [        R                  " X5      5      nX2S-
  -  [         R                  " SU-
  5      US-
  -  -   n[         R                  " SS9   S[         R                  " U5      -  n[         R
                  " US:*  [        U5      S[         R                  " U5      -  :  -  US5      sS S S 5        $ ! , (       d  f       g = f)Nr•   r   rp  rq  r   r”   )rQ   r"  r~   Útklmbdars  rÃ  r  )rE   rv   r÷  ÚFxr-  s        r6   rw   Útukeylambda_gen._pdfc*  s˜   € Ü�ZŠZœŸ
š
 1Ó*Ó+ˆØ�c‘'‰]œbŸjšj¨¨2©Ó.°#°c±'Ñ:Ñ:ˆÜ�[Š[ Ó)Ø”R—Z’Z “^Ñ#ˆBÜ—8’8˜S A™X¬#¨a«&°3´r·z²zÀ#³Ñ3FÑ*FÑGÈÈSÓQ÷ *×)×)ús   Á&AC
Ã

Cc                 ó.   • [         R                  " X5      $ rO   )r~   r   )rE   rv   r÷  s      r6   r{   Útukeylambda_gen._cdfj*  s   € Ü�zŠz˜!Ó!Ð!r8   c                 ó`   • [         R                  " X5      [         R                  " U* U5      -
  $ rO   )r~   r  r  )rE   r…   r÷  s      r6   r†   Útukeylambda_gen._ppfm*  s#   € Ü�yŠy˜Ó ¤2§;¢;°¨r°3Ó#7Ñ7Ð7r8   c                 ó2   • S[        U5      S[        U5      4$ rö  )Ú_tlvarÚ_tlkurtrö  s     r6   r   Útukeylambda_gen._statsp*  s   € Ø”&˜“+˜q¤'¨#£,Ð.Ð.r8   c                 óF   ^• U4S jn[         R                  " USS5      S   $ )Nc                 óp   >• [         R                  " [        U TS-
  5      [        SU -
  TS-
  5      -   5      $ ra   )rQ   r  rÃ  )rV  r÷  s    €r6   ÚintegÚ'tukeylambda_gen._entropy.<locals>.integt*  s/   ø€ Ü—6’6œ#˜a  Q¡›-¬¨A¨a©C°°Q±«Ñ7Ó8Ð8r8   r   r   )r   rO  )rE   r÷  r  s    ` r6   r  Útukeylambda_gen._entropys*  s    ø€ õ	9ä�~Š~˜e Q¨Ó*¨1Ñ-Ð-r8   r�   N)rŽ   r�   r�   r‘   r’   r   rI  rJ  rf   ro   r¥   rw   r{   r†   r   r  r“   r�   r8   r6   rô  rô  >*  s>   † ñð, "×4Ñ4€Mò òMòòRò"ò8ò/õ.r8   rô  Útukeylambdac                   ó   • \ rS rSrS rSrg)ÚFitUniformFixedScaleDataErrori|*  c                 ó    • SU SU S3U l         g )Nz Invalid values in `data`.  Maximum likelihood estimation with the uniform distribution and fixed scale requires that np.ptp(data) <= fscale, but np.ptp(data) = z and fscale = r2   r‰  )rE   rr  r  s      r6   rŒ  Ú&FitUniformFixedScaleDataError.__init__}*  s$   € ð:à:=¸ð ?Ø�x˜qð"ð 	�	r8   r‰  N)rŽ   r�   r�   r‘   rŒ  r“   r�   r8   r6   r  r  |*  s   † õ
r8   r  c                   óV   • \ rS rSrSrS rSS jrS rS rS r	S	 r
S
 r\S 5       rSrg)Úuniform_geni†*  zôA uniform continuous random variable.

In the standard form, the distribution is uniform on ``[0, 1]``. Using
the parameters ``loc`` and ``scale``, one obtains the uniform distribution
on ``[loc, loc + scale]``.

%(before_notes)s

%(example)s

c                 ó   • / $ rO   r�   rn   s    r6   ro   Úuniform_gen._shape_info’*  r¼   r8   Nc                 ó(   • UR                  SSU5      $ r   )rË  rò   s      r6   rõ   Úuniform_gen._rvs•*  s   € Ø×#Ñ# C¨¨dÓ3Ð3r8   c                 ó   • SX:H  -  $ r>  r�   r¿   s     r6   rw   Úuniform_gen._pdf˜*  s   € Ø�A‘F‰|Ðr8   c                 ó   • U$ rO   r�   r¿   s     r6   r{   Úuniform_gen._cdf›*  ó   € Øˆr8   c                 ó   • U$ rO   r�   rÉ   s     r6   r†   Úuniform_gen._ppfž*  r  r8   c                 ó   • g)N)r£   gUUUUUUµ?r   g333333ó¿r�   rn   s    r6   r   Úuniform_gen._stats¡*  s   € Ø#r8   c                 ó   • gry  r�   rn   s    r6   r  Úuniform_gen._entropy¤*  rg  r8   c                 óº  • [        U5      S:”  a  [        S5      eUR                  SS5      nUR                  SS5      n[        U5        Ub  Ub  [	        S5      e[
        R                  " U5      n[
        R                  " U5      R                  5       (       d  [	        S5      eUca  Uc'  UR                  5       n[
        R                  " U5      nOuUnUR                  5       U-
  nUR                  5       U:  a  [        SXfU-   S	9eO>[
        R                  " U5      nX…:”  a	  [        X…S
9eUR                  5       SXX-
  -  -
  nUn[        U5      [        U5      4$ )aÎ  
Maximum likelihood estimate for the location and scale parameters.

`uniform.fit` uses only the following parameters.  Because exact
formulas are used, the parameters related to optimization that are
available in the `fit` method of other distributions are ignored
here.  The only positional argument accepted is `data`.

Parameters
----------
data : array_like
    Data to use in calculating the maximum likelihood estimate.
floc : float, optional
    Hold the location parameter fixed to the specified value.
fscale : float, optional
    Hold the scale parameter fixed to the specified value.

Returns
-------
loc, scale : float
    Maximum likelihood estimates for the location and scale.

Notes
-----
An error is raised if `floc` is given and any values in `data` are
less than `floc`, or if `fscale` is given and `fscale` is less
than ``data.max() - data.min()``.  An error is also raised if both
`floc` and `fscale` are given.

Examples
--------
>>> import numpy as np
>>> from scipy.stats import uniform

We'll fit the uniform distribution to `x`:

>>> x = np.array([2, 2.5, 3.1, 9.5, 13.0])

For a uniform distribution MLE, the location is the minimum of the
data, and the scale is the maximum minus the minimum.

>>> loc, scale = uniform.fit(x)
>>> loc
2.0
>>> scale
11.0

If we know the data comes from a uniform distribution where the support
starts at 0, we can use ``floc=0``:

>>> loc, scale = uniform.fit(x, floc=0)
>>> loc
0.0
>>> scale
13.0

Alternatively, if we know the length of the support is 12, we can use
``fscale=12``:

>>> loc, scale = uniform.fit(x, fscale=12)
>>> loc
1.5
>>> scale
12.0

In that last example, the support interval is [1.5, 13.5].  This
solution is not unique.  For example, the distribution with ``loc=2``
and ``scale=12`` has the same likelihood as the one above.  When
`fscale` is given and it is larger than ``data.max() - data.min()``,
the parameters returned by the `fit` method center the support over
the interval ``[data.min(), data.max()]``.

r   ri  r  Nr  r  r   rË  rè  )rr  r  r£   )rí  r4   r3   r7   r!  rQ   r"  r#  r$  rk  rr  rQ  r‡  r  r  )	rE   rF   rG   r5   r  r  r.   r/   rr  s	            r6   rC   Úuniform_gen.fit§*  sF  € ôV ˆt‹9�q‹=ÜÐ1Ó2Ð2à�x‰x˜ Ó%ˆØ—‘˜( DÓ)ˆä$ TÔ*àÑ Ñ 2äð )ó *ð *ô �zŠz˜$Óˆä�{Š{˜4Ó ×$Ñ$×&Ñ&ÜÐCÓDÐDð> ‰>à‰|à—h‘h“j�ÜŸš˜t›‘ð �ØŸ™›
 SÑ(�Ø—8‘8“: Ó#Ü& y¸ÈÁ;ÑOÐOð $ô —&’&˜“,ˆCØ‹|Ü3¸ÑKÐKð —(‘(“*˜s F¡LÑ1Ñ1ˆCØˆEô �S‹zœ5 ›<Ð'Ð'r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rõ   rw   r{   r†   r   r  rL   rC   r“   r�   r8   r6   r  r  †*  s@   † ñ
òô4òòòò$òð ñR(ó óR(r8   r  rË  c                   óÈ   ^ • \ rS rSrSrS rS rSS jr\" \	5      U 4S j5       r
S rS rS	 rS
 rS r\" \	SS9  SU 4S jj5       r\\" \	SS9U 4S j5       5       rSrU =r$ )Úvonmises_geni@+  aE  A Von Mises continuous random variable.

%(before_notes)s

See Also
--------
scipy.stats.vonmises_fisher : Von-Mises Fisher distribution on a
                              hypersphere

Notes
-----
The probability density function for `vonmises` and `vonmises_line` is:

.. math::

    f(x, \kappa) = \frac{ \exp(\kappa \cos(x)) }{ 2 \pi I_0(\kappa) }

for :math:`-\pi \le x \le \pi`, :math:`\kappa \ge 0`. :math:`I_0` is the
modified Bessel function of order zero (`scipy.special.i0`).

`vonmises` is a circular distribution which does not restrict the
distribution to a fixed interval. Currently, there is no circular
distribution framework in SciPy. The ``cdf`` is implemented such that
``cdf(x + 2*np.pi) == cdf(x) + 1``.

`vonmises_line` is the same distribution, defined on :math:`[-\pi, \pi]`
on the real line. This is a regular (i.e. non-circular) distribution.

Note about distribution parameters: `vonmises` and `vonmises_line` take
``kappa`` as a shape parameter (concentration) and ``loc`` as the location
(circular mean). A ``scale`` parameter is accepted but does not have any
effect.

Examples
--------
Import the necessary modules.

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> from scipy.stats import vonmises

Define distribution parameters.

>>> loc = 0.5 * np.pi  # circular mean
>>> kappa = 1  # concentration

Compute the probability density at ``x=0`` via the ``pdf`` method.

>>> vonmises.pdf(0, loc=loc, kappa=kappa)
0.12570826359722018

Verify that the percentile function ``ppf`` inverts the cumulative
distribution function ``cdf`` up to floating point accuracy.

>>> x = 1
>>> cdf_value = vonmises.cdf(x, loc=loc, kappa=kappa)
>>> ppf_value = vonmises.ppf(cdf_value, loc=loc, kappa=kappa)
>>> x, cdf_value, ppf_value
(1, 0.31489339900904967, 1.0000000000000004)

Draw 1000 random variates by calling the ``rvs`` method.

>>> sample_size = 1000
>>> sample = vonmises(loc=loc, kappa=kappa).rvs(sample_size)

Plot the von Mises density on a Cartesian and polar grid to emphasize
that it is a circular distribution.

>>> fig = plt.figure(figsize=(12, 6))
>>> left = plt.subplot(121)
>>> right = plt.subplot(122, projection='polar')
>>> x = np.linspace(-np.pi, np.pi, 500)
>>> vonmises_pdf = vonmises.pdf(x, loc=loc, kappa=kappa)
>>> ticks = [0, 0.15, 0.3]

The left image contains the Cartesian plot.

>>> left.plot(x, vonmises_pdf)
>>> left.set_yticks(ticks)
>>> number_of_bins = int(np.sqrt(sample_size))
>>> left.hist(sample, density=True, bins=number_of_bins)
>>> left.set_title("Cartesian plot")
>>> left.set_xlim(-np.pi, np.pi)
>>> left.grid(True)

The right image contains the polar plot.

>>> right.plot(x, vonmises_pdf, label="PDF")
>>> right.set_yticks(ticks)
>>> right.hist(sample, density=True, bins=number_of_bins,
...            label="Histogram")
>>> right.set_title("Polar plot")
>>> right.legend(bbox_to_anchor=(0.15, 1.06))

c                 ó@   • [        SSS[        R                  4S5      /$ )Nr
  Fr   rk   rl   rn   s    r6   ro   Úvonmises_gen._shape_info +  s   € Ü˜7 E¨A¬r¯v©v¨;¸ÓFÐGÐGr8   c                 ó   • US:¬  $ rö  r�   r%
  s     r6   rf   Úvonmises_gen._argcheck£+  s   € Ø˜‰zÐr8   c                 ó"   • UR                  SXS9$ )Nr”   rÊ  )Úvonmises)rE   r
  ró   rô   s       r6   rõ   Úvonmises_gen._rvs¦+  s   € Ø×$Ñ$ S¨%Ð$Ð;Ð;r8   c                 ó¸   >• [         TU ]  " U0 UD6n[        R                  " U[        R                  -   S[        R                  -  5      [        R                  -
  $ rD  ©rA   r7  rQ   Úmodr  ©rE   rG   r5   r7  rÞ  s       €r6   r7  Úvonmises_gen.rvs©+  s@   ø€ ä‰gŠk˜4Ð( 4Ñ(ˆÜ�vŠv�cœBŸE™E‘k 1¤R§U¡U¡7Ó+¬b¯e©eÑ3Ð3r8   c                 ó²   • [         R                  " U[        R                  " U5      -  5      S[         R                  -  [        R
                  " U5      -  -  $ rD  )rQ   rÒ   r~   Úcosm1r  r  r
  s      r6   rw   Úvonmises_gen._pdf®+  s:   € ô
 �vŠv�eœBŸHšH Q›KÑ'Ó(¨A¬b¯e©e©G´B·F²F¸5³MÑ,AÑBÐBr8   c                 óÚ   • U[         R                  " U5      -  [        R                  " S[        R                  -  5      -
  [        R                  " [         R
                  " U5      5      -
  $ rD  )r~   r7  rQ   r  r  r  r
  s      r6   rü   Úvonmises_gen._logpdfµ+  s@   € à”r—x’x “{Ñ"¤R§V¢V¨A¬b¯e©e©G£_Ñ4´r·v²v¼b¿fºfÀU»mÓ7LÑLÐLr8   c                 ó.   • [         R                  " X!5      $ rO   )r   Úvon_mises_cdfr
  s      r6   r{   Úvonmises_gen._cdf¹+  s   € Ü×#Ò# EÓ-Ð-r8   c                 ó   • grC  r�   r%
  s     r6   Ú_stats_skipÚvonmises_gen._stats_skip¼+  rE  r8   c                 óè   • U* [         R                  " U5      -  [         R                  " U5      -  [        R                  " S[        R
                  -  [         R                  " U5      -  5      -   U-   $ rD  )r~   Úi1er  rQ   r  r  r%
  s     r6   r  Úvonmises_gen._entropy¿+  sV   € ð �œŸš ›Ñ&¬¯ª°«Ñ6Ü—’�qœ2Ÿ5™5‘y¤2§6¢6¨%£=Ñ0Ó1ñ2Ø49ñ:ð 	;r8   z¢        The default limits of integration are endpoints of the interval
        of width ``2*pi`` centered at `loc` (e.g. ``[-pi, pi]`` when
        ``loc=0``).

r  r�   c           	      óˆ   >• [         R                  * [         R                  p©Uc  X9-   nUc  X:-   n[        TU ]  " XUXEXg40 UD6$ rO   )rQ   r  rA   Úexpect)rE   rœ  rG   r.   r/   ÚlbÚubÚconditionalr5   rA  r@  rÞ  s              €r6   rE  Úvonmises_gen.expectË+  sS   ø€ ô —%‘%�œŸ™ˆBà‰:Ø‘ˆBØ‰:Ø‘ˆBä‰wŠ~˜d¨#Ø#¨ñBØ<@ñBð 	Br8   a          Fit data is assumed to represent angles and will be wrapped onto the
        unit circle. `f0` and `fscale` are ignored; the returned shape is
        always the maximum likelihood estimate and the scale is always
        1. Initial guesses are ignored.

c                 ó
  >• UR                  SS5      (       a  [        TU ]  " U/UQ70 UD6$ [        XX#5      u  ppVU R                  [
        R                  * :X  a  [        TU ]  " U/UQ70 UD6$ [
        R                  " US[
        R                  -  5      nS nS nUb  UOU" U5      n	Ub  UOU" X5      n
[
        R                  " U	[
        R                  -   S[
        R                  -  5      [
        R                  -
  n	X©S4$ )Nrb  FrW   c                 ó.   • [         R                  " U 5      $ rO   )rT  Úcircmean)rF   s    r6   Úfind_muÚ!vonmises_gen.fit.<locals>.find_muî+  s   € Ü—>’> $Ó'Ð'r8   c                 óp  ^• [         R                  " [         R                  " X-
  5      5      [        U 5      -  mTS:X  a  gTS:”  aM  U4S jnTST-
  -  ST-   -  nSU-  nU" U5      S:¼  a  U$ U" U5      S::  a  U$ [	        USX44S9nUR
                  $ [         R                  " [        5      R                  $ )Nr   g €à7yÃACr   c                 ód   >• [         R                  " U 5      [         R                  " U 5      -  T-
  $ rO   )r~   rB  r  )r
  rW  s    €r6   Úsolve_for_kappaÚ=vonmises_gen.fit.<locals>.find_kappa.<locals>.solve_for_kappa,  s#   ø€ ÜŸ6š6 %›=¬¯ª°«Ñ6¸Ñ:Ð:r8   rW   rË  )r1   rn  )	rQ   rî  rQ  rí  r+   rq  r  r  r  )rF   r.   rQ  Úlower_boundÚupper_boundÚroot_resrW  s         @r6   Ú
find_kappaÚ$vonmises_gen.fit.<locals>.find_kappañ+  s¾   ø€ ô —’”r—v’v˜c™jÓ)Ó*¬3¨t«9Ñ4ˆAð �A‹vð Ø�Q“õ;ð    1¡™g q¨¡s™m�Ø ™m�ñ # ;Ó/°1Ó4Ø&Ð&Ù$ [Ó1°QÓ6Ø&Ð&ä*¨?À8Ø4?Ð3Mñ O�Hà#Ÿ=™=Ð(ô —x’x¤“×+Ñ+Ð+r8   r   )r3   rA   rC   rp  r—   rQ   r  r3  )rE   rF   rG   r5   r  r  r  rM  rV  r.   rj  rÞ  s              €r6   rC   Úvonmises_gen.fitÛ+  sê   ø€ ð �8‰8�J ×&Ñ&Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ä%@ÀØAEó&MÑ"ˆ�dà�6‰6”b—e‘e�VÓä‘7’;˜tÐ3 dÒ3¨dÑ3Ð3ô �vŠv�d˜A¤§¡™IÓ&ˆò	(ò6	,ðr Ñ&‰d©G°D«Mˆà Ñ,‘±*¸TÓ2Gˆä�fŠf�Sœ2Ÿ5™5‘[ !¤b§e¡e¡)Ó,¬r¯u©uÑ4ˆØ˜1ˆ}Ðr8   r-  )Nr�   r   r   NNF)rŽ   r�   r�   r‘   r’   ro   rf   rõ   r   r   r7  rw   rü   r{   r?  r  r	   rE  rL   rC   r“   r-  r.  s   @r6   r)  r)  @+  s¤   ø† ñ^ò~Hòô<ñ ˜MÓ*ô4ó +ð4òCòMò.ò ò
;ñ ˜}ð 5ñ ð FJØ ö
Bó	ð
Bð Ù˜}ð 5/ñ 0ô
Nó0ó öNr8   r)  r/  Úvonmises_linec                   ó|   • \ rS rSrSr\R                  rS rSS jr	S r
S rS rS	 rS
 rS rS rS rS rS rSrg)rÇ  i6,  a,  A Wald continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `wald` is:

.. math::

    f(x) = \frac{1}{\sqrt{2\pi x^3}} \exp(- \frac{ (x-1)^2 }{ 2x })

for :math:`x >= 0`.

`wald` is a special case of `invgauss` with ``mu=1``.

%(after_notes)s

%(example)s
c                 ó   • / $ rO   r�   rn   s    r6   ro   Úwald_gen._shape_infoM,  r¼   r8   Nc                 ó$   • UR                  SSUS9$ r¤  r¥  rò   s      r6   rõ   Úwald_gen._rvsP,  s   € Ø× Ñ   c°Ð Ð5Ð5r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  rw   r¿   s     r6   rw   Úwald_gen._pdfS,  s   € ä�}‰}˜Q Ó$Ð$r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  r{   r¿   s     r6   r{   Úwald_gen._cdfW,  ó   € Ü�}‰}˜Q Ó$Ð$r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  r€   r¿   s     r6   r€   Úwald_gen._sfZ,  s   € Ü�|‰|˜A˜sÓ#Ð#r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  r†   r¿   s     r6   r†   Úwald_gen._ppf],  rc  r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  rŠ   r¿   s     r6   rŠ   Úwald_gen._isf`,  rc  r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  rü   r¿   s     r6   rü   Úwald_gen._logpdfc,  ó   € Ü×Ñ  3Ó'Ð'r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  r  r¿   s     r6   r  Úwald_gen._logcdff,  rl  r8   c                 ó.   • [         R                  US5      $ r>  )rÆ  r	  r¿   s     r6   r	  Úwald_gen._logsfi,  s   € Ü�‰˜q #Ó&Ð&r8   c                 ó   • g)N)r•   r•   r·  rÖ  r�   rn   s    r6   r   Úwald_gen._statsl,  s   € Ø"r8   c                 ó,   • [         R                  S5      $ r>  )rÆ  r  rn   s    r6   r  Úwald_gen._entropyo,  s   € Ü× Ñ  Ó%Ð%r8   r�   r-  )rŽ   r�   r�   r‘   r’   r   rI  rJ  ro   rõ   rw   r{   r€   r†   rŠ   rü   r  r	  r   r  r“   r�   r8   r6   rÇ  rÇ  6,  sP   † ñð( "×4Ñ4€Mòô6ò%ò%ò$ò%ò%ò(ò(ò'ò#õ&r8   rÇ  r¦  c                   ól   ^ • \ rS rSrSrS rS rS rS rS r	S r
S	 r\" \5      U 4S
 j5       rSrU =r$ )Úwrapcauchy_geniv,  aS  A wrapped Cauchy continuous random variable.

%(before_notes)s

Notes
-----
The probability density function for `wrapcauchy` is:

.. math::

    f(x, c) = \frac{1-c^2}{2\pi (1+c^2 - 2c \cos(x))}

for :math:`0 \le x \le 2\pi`, :math:`0 < c < 1`.

`wrapcauchy` takes ``c`` as a shape parameter for :math:`c`.

%(after_notes)s

%(example)s

c                 ó   • US:„  US:  -  $ r#  r�   r	  s     r6   rf   Úwrapcauchy_gen._argcheckŒ,  s   € Ø�A‘˜!˜a™%Ñ Ð r8   c                 ó    • [        SSSS5      /$ )Nrj  F)r   r   r3  r|  rn   s    r6   ro   Úwrapcauchy_gen._shape_info�,  s   € Ü˜3  v¨~Ó>Ð?Ð?r8   c                 ó‚   • SX"-  -
  S[         R                  -  SX"-  -   SU-  [         R                  " U5      -  -
  -  -  $ r  r¨  rn  s      r6   rw   Úwrapcauchy_gen._pdf’,  s;   € à�A‘C‘˜!œBŸE™E™' 1 Q¡S¡5¨¨1©¬R¯VªV°A«Y©Ñ#6Ñ7Ñ8Ð8r8   c                 óx   • S nS nSU-   SU-
  -  n[         R                  " U[        R                  :  X4X45      $ )Nc                 óŠ   • S[         R                  -  [         R                  " U[         R                  " U S-  5      -  5      -  $ rf  ©rQ   r  rù  rì  ©rv   Úcrs     r6   rå  Úwrapcauchy_gen._cdf.<locals>.f1˜,  s.   € à”R—U‘U‘7œRŸYšY r¬"¯&ª&°°1±«+¡~Ó6Ñ6Ð6r8   c           	      ó¸   • SS[         R                  -  [         R                  " U[         R                  " S[         R                  -  U -
  S-  5      -  5      -  -
  $ rf  r  r€  s     r6   r’  Úwrapcauchy_gen._cdf.<locals>.f2œ,  sA   € à�qœŸ™‘w¤§¢¨2¬b¯fªf°a¼¿¹±gÀ±kÀ1±_Ó.EÑ+EÓ!FÑFÑFÐFr8   r   )r#  r$  rQ   r  )rE   rv   rj  rå  r’  r�  s         r6   r{   Úwrapcauchy_gen._cdf–,  s=   € ò	7ò	Gð �!‰e�a˜!‘e‰_ˆÜ�Š˜q¤2§5¡5™y¨1¨'°2Ó:Ð:r8   c           
      ó~  • SU-
  SU-   -  nS[         R                  " U[         R                  " [         R                  U-  5      -  5      -  nS[         R                  -  S[         R                  " U[         R                  " [         R                  SU-
  -  5      -  5      -  -
  n[         R                  " US:  XE5      $ )Nr•   rW   r   r£   )rQ   rù  rì  r  rÃ  )rE   r…   rj  r¶  ÚrcqÚrcmqs         r6   r†   Úwrapcauchy_gen._ppf£,  sŠ   € Ø�1‰u�s˜1‘u‰oˆØ”—	’	˜#œbŸfšf¤R§U¡U¨1¡W›oÑ-Ó.Ñ.ˆØ”—‘‰w�qœŸš 3¤r§v¢v¬b¯e©e°Q°q±S©kÓ':Ñ#:Ó;Ñ;Ñ;ˆÜ�xŠx˜˜E™	 3Ó-Ð-r8   c                 ó`   • [         R                  " S[         R                  -  SX-  -
  -  5      $ r  r  r	  s     r6   r  Úwrapcauchy_gen._entropy©,  s#   € Ü�vŠv�aœŸ™‘g˜q ¡™u‘oÓ&Ð&r8   c                 óÎ   • [        U[        5      (       a  UR                  5       nS[        R                  " U5      [        R
                  " U5      S[        R                  -  -  4$ rT  )r?   r*   rÛ  rQ   rk  rr  r  )rE   rF   s     r6   rÝ  Úwrapcauchy_gen._fitstart¬,  sG   € ô �dœL×)Ñ)Ø—>‘>Ó#ˆDØ”B—F’F˜4“L¤"§&¢&¨£,°´"·%±%±Ñ"8Ð8Ð8r8   c                 ót   >• [         TU ]  " U0 UD6n[        R                  " US[        R                  -  5      $ rD  r2  r4  s       €r6   r7  Úwrapcauchy_gen.rvs´,  s/   ø€ ä‰gŠk˜4Ð( 4Ñ(ˆÜ�vŠv�c˜1œRŸU™U™7Ó#Ð#r8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   rw   r{   r†   r  rÝ  r   r   r7  r“   r-  r.  s   @r6   rv  rv  v,  sE   ø† ñò*!ò@ò9ò;ò.ò'ò9ñ ˜MÓ*ô$ó +ö$r8   rv  Ú
wrapcauchyc                   ó^   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rS rS rSS jrSrg)Úgennorm_geni¼,  aÀ  A generalized normal continuous random variable.

%(before_notes)s

See Also
--------
laplace : Laplace distribution
norm : normal distribution

Notes
-----
The probability density function for `gennorm` is [1]_:

.. math::

    f(x, \beta) = \frac{\beta}{2 \Gamma(1/\beta)} \exp(-|x|^\beta),

where :math:`x` is a real number, :math:`\beta > 0` and
:math:`\Gamma` is the gamma function (`scipy.special.gamma`).

`gennorm` takes ``beta`` as a shape parameter for :math:`\beta`.
For :math:`\beta = 1`, it is identical to a Laplace distribution.
For :math:`\beta = 2`, it is identical to a normal distribution
(with ``scale=1/sqrt(2)``).

References
----------

.. [1] "Generalized normal distribution, Version 1",
       https://en.wikipedia.org/wiki/Generalized_normal_distribution#Version_1

.. [2] Nardon, Martina, and Paolo Pianca. "Simulation techniques for
       generalized Gaussian densities." Journal of Statistical
       Computation and Simulation 79.11 (2009): 1317-1329

.. [3] Wicklin, Rick. "Simulate data from a generalized Gaussian
       distribution" in The DO Loop blog, September 21, 2016,
       https://blogs.sas.com/content/iml/2016/09/21/simulate-generalized-gaussian-sas.html

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ ©Nr­  Fr   r3  rl   rn   s    r6   ro   Úgennorm_gen._shape_infoç,  ó   € Ü˜6 5¨1¬b¯f©f¨+°~ÓFÐGÐGr8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  ©rE   rv   r­  s      r6   rw   Úgennorm_gen._pdfê,  s   € Ü�vŠv�d—l‘l 1Ó+Ó,Ð,r8   c                 ó†   • [         R                  " SU-  5      [        R                  " SU-  5      -
  [	        U5      U-  -
  $ r¢   )rQ   r  r~   r  r  r˜  s      r6   rü   Úgennorm_gen._logpdfí,  s4   € Ü�vŠv�c˜$‘hÓ¤"§*¢*¨S°©XÓ"6Ñ6¼¸Q»À¹ÑEÐEr8   c                 ó’   • S[         R                  " U5      -  nSU-   U[        R                  " SU-  [	        U5      U-  5      -  -
  $ r¢   )rQ   rR   r~   rZ  r  ©rE   rv   r­  rj  s       r6   r{   Úgennorm_gen._cdfð,  s?   € Ø”"—'’'˜!“*Ñˆà�a‘˜1œrŸ|š|¨C°©H´c¸!³f¸d±lÓCÑCÑCÐCr8   c                 ó’   • [         R                  " US-
  5      nU[        R                  " SU-  SU-   SU-  U-  -
  5      SU-  -  -  $ )Nr£   r•   rÑ   )rQ   rR   r~   rd  r�  s       r6   r†   Úgennorm_gen._ppfõ,  sH   € Ü�GŠG�A˜‘GÓˆà”2—?’? 3 t¡8¨c°A©g¸¸Q¹¸q¹Ñ-@ÓAÀCÈÁHÑMÑMÐMr8   c                 ó(   • U R                  U* U5      $ rO   rü	  r˜  s      r6   r€   Úgennorm_gen._sfú,  s   € Ø�y‰y˜!˜˜TÓ"Ð"r8   c                 ó&   • U R                  X5      * $ rO   rÓ  r˜  s      r6   rŠ   Úgennorm_gen._isfý,  s   € Ø—	‘	˜!Ó"Ð"Ð"r8   c                 óš   • US:X  a  gUS-  S:X  a;  [         R                  " SU-  US-   U-  /5      u  p4[        R                  " XC-
  5      $ g)Nr   r•   rW   r”   ©r~   r  rQ   rÒ   )rE   re   r­  Úc1Úcns        r6   r+  Úgennorm_gen._munp -  sK   € Ø�‹6ØØˆq‰5�A‹:Ü—Z’Z  T¡¨A°©G°T©>Ð :Ó;‰FˆBÜ—6’6˜"™'“?Ð"àr8   c                 óÂ   • [         R                  " SU-  SU-  SU-  /5      u  p#nS[        R                  " X2-
  5      S[        R                  " XB-   SU-  -
  5      S-
  4$ )Nr•   r·  r¾  r”   rÑ   r¦  )rE   r­  r§  Úc3Úc5s        r6   r   Úgennorm_gen._stats	-  sY   € Ü—Z’Z  T¡¨3¨t©8°S¸±XÐ >Ó?‰
ˆ�Ø”2—6’6˜"™'“? B¬¯ª¨r©w¸¸R¹Ñ/?Ó(@À2Ñ(EÐEÐEr8   c                 ót   • SU-  [         R                  " SU-  5      -
  [        R                  " SU-  5      -   $ r{  r‚  ©rE   r­  s     r6   r  Úgennorm_gen._entropy-  s0   € Ø�D‰yœ2Ÿ6š6 " t¡)Ó,Ñ,¬r¯zªz¸"¸t¹)Ó/DÑDÐDr8   Nc                 ó®   • UR                  SU-  US9nUSU-  -  n[        R                  " U5      nUR                  UR                  S9S:  nXV   * XV'   U$ )Nr   rÊ  r£   )r6  rQ   r"  Úrandomrj  )rE   r­  ró   rô   rë  r�  rç  s          r6   rõ   Úgennorm_gen._rvs-  sc   € ð ×Ñ˜q ™v¨DÐÐ1ˆØ�!�D‘&‰Mˆä�JŠJ�q‹MˆØ×"Ñ"¨¯©Ð"Ð0°3Ñ6ˆØ‘7�(ˆ‰Øˆr8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rw   rü   r{   r†   r€   rŠ   r+  r   r  rõ   r“   r�   r8   r6   r’  r’  ¼,  sE   † ñ)òTHò-òFòDò
Nò
#ò#òòFòE÷	r8   r’  Úgennormc                   óH   • \ rS rSrSrS rS rS rS rS r	S r
S	 rS
 rSrg)Úhalfgennorm_geni-  aY  The upper half of a generalized normal continuous random variable.

%(before_notes)s

See Also
--------
gennorm : generalized normal distribution
expon : exponential distribution
halfnorm : half normal distribution

Notes
-----
The probability density function for `halfgennorm` is:

.. math::

    f(x, \beta) = \frac{\beta}{\Gamma(1/\beta)} \exp(-|x|^\beta)

for :math:`x, \beta > 0`. :math:`\Gamma` is the gamma function
(`scipy.special.gamma`).

`halfgennorm` takes ``beta`` as a shape parameter for :math:`\beta`.
For :math:`\beta = 1`, it is identical to an exponential distribution.
For :math:`\beta = 2`, it is identical to a half normal distribution
(with ``scale=1/sqrt(2)``).

References
----------

.. [1] "Generalized normal distribution, Version 1",
       https://en.wikipedia.org/wiki/Generalized_normal_distribution#Version_1

%(example)s

c                 ó@   • [        SSS[        R                  4S5      /$ r”  rl   rn   s    r6   ro   Úhalfgennorm_gen._shape_infoC-  r–  r8   c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  r˜  s      r6   rw   Úhalfgennorm_gen._pdfF-  s   € ô �vŠv�d—l‘l 1Ó+Ó,Ð,r8   c                 ól   • [         R                  " U5      [        R                  " SU-  5      -
  X-  -
  $ r>  r‚  r˜  s      r6   rü   Úhalfgennorm_gen._logpdfL-  s)   € Ü�vŠv�d‹|œbŸjšj¨¨T©Ó2Ñ2°Q±WÑ<Ð<r8   c                 ó:   • [         R                  " SU-  X-  5      $ r>  rU  r˜  s      r6   r{   Úhalfgennorm_gen._cdfO-  s   € Ü�{Š{˜3˜t™8 Q¡WÓ-Ð-r8   c                 óB   • [         R                  " SU-  U5      SU-  -  $ r>  r“  r˜  s      r6   r†   Úhalfgennorm_gen._ppfR-  s    € Ü�~Š~˜c $™h¨Ó*¨S°©XÑ6Ð6r8   c                 ó:   • [         R                  " SU-  X-  5      $ r>  rY  r˜  s      r6   r€   Úhalfgennorm_gen._sfU-  s   € Ü�|Š|˜C ™H a¡gÓ.Ð.r8   c                 óB   • [         R                  " SU-  U5      SU-  -  $ r>  r³  r˜  s      r6   rŠ   Úhalfgennorm_gen._isfX-  s    € Ü�Š˜s 4™x¨Ó+¨c°$©hÑ7Ð7r8   c                 ón   • SU-  [         R                  " U5      -
  [        R                  " SU-  5      -   $ r>  r‚  r¯  s     r6   r  Úhalfgennorm_gen._entropy[-  s+   € Ø�4‰xœ"Ÿ&š& ›,Ñ&¬¯ª°C¸±HÓ)=Ñ=Ð=r8   r�   NrŽ  r�   r8   r6   r¶  r¶  -  s1   † ñ"òFHò-ò=ò.ò7ò/ò8õ>r8   r¶  Úhalfgennormc                   ó\   ^ • \ rS rSrSrS rS rU 4S jrS rS r	S r
S	 rS
 rS rSrU =r$ )Úcrystalball_genib-  aY  
Crystalball distribution

%(before_notes)s

Notes
-----
The probability density function for `crystalball` is:

.. math::

    f(x, \beta, m) =  \begin{cases}
                        N \exp(-x^2 / 2),  &\text{for } x > -\beta\\
                        N A (B - x)^{-m}  &\text{for } x \le -\beta
                      \end{cases}

where :math:`A = (m / |\beta|)^m  \exp(-\beta^2 / 2)`,
:math:`B = m/|\beta| - |\beta|` and :math:`N` is a normalisation constant.

`crystalball` takes :math:`\beta > 0` and :math:`m > 1` as shape
parameters.  :math:`\beta` defines the point where the pdf changes
from a power-law to a Gaussian distribution.  :math:`m` is the power
of the power-law tail.

%(after_notes)s

.. versionadded:: 0.19.0

References
----------
.. [1] "Crystal Ball Function",
       https://en.wikipedia.org/wiki/Crystal_Ball_function

%(example)s
c                 ó   • US:„  US:„  -  $ )z0
Shape parameter bounds are m > 1 and beta > 0.
r   r   r�   )rE   r­  r  s      r6   rf   Úcrystalball_gen._argcheck†-  s   € ð �A‘˜$ ™(Ñ#Ð#r8   c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ )Nr­  Fr   r3  r  r   rl   )rE   ÚibetaÚims      r6   ro   Úcrystalball_gen._shape_infoŒ-  s:   € Ü˜6 5¨1¬b¯f©f¨+°~ÓFˆÜ˜˜U Q¬¯© K°Ó@ˆØˆ{Ðr8   c                 ó    >• [         TU ]  USS9$ )N)r   rg  r‰  r  r€  s     €r6   rÝ  Úcrystalball_gen._fitstart‘-  s   ø€ ä‰wÑ  ¨HÐ Ð5Ð5r8   c                 óÊ   • SX2-  US-
  -  [         R                  " US-  * S-  5      -  [        [        U5      -  -   -  nS nS nU[        R
                  " X* :„  XU4XV5      -  $ )a(  
Return PDF of the crystalball function.

                                    --
                                   | exp(-x**2 / 2),  for x > -beta
crystalball.pdf(x, beta, m) =  N * |
                                   | A * (B - x)**(-m), for x <= -beta
                                    --
r•   r   rW   rÑ   c                 ó<   • [         R                  " U S-  * S-  5      $ rD  rP  ©rv   r­  r  s      r6   ÚrhsÚ!crystalball_gen._pdf.<locals>.rhs¢-  s   € Ü—6’6˜1˜a™4˜% !™)Ó$Ð$r8   c                 ój   • X!-  U-  [         R                  " US-  * S-  5      -  X!-  U-
  U -
  U* -  -  $ rÐ   rP  rÔ  s      r6   ÚlhsÚ!crystalball_gen._pdf.<locals>.lhs¥-  sB   € Ø‘V˜a‘K¤"§&¢&¨$°©'¨°C©Ó"8Ñ8Ø‘V˜d‘] QÑ&¨1¨"Ñ-ñ.ð /r8   ©rQ   rÒ   rÓ   rÛ   r#  r$  ©rE   rv   r­  r  r	  rÕ  rØ  s          r6   rw   Úcrystalball_gen._pdf•-  so   € ð �1‘6˜Q˜q™S‘>¤B§F¢F¨D°!©G¨8°c©>Ó$:Ñ:Ü¤¨4£Ñ0ñ1ñ 2ˆò	%ò	/ð ”3—?’? 1 u¡9¨q¸¨l¸CÓEÑEÐEr8   c                 óò   • SX2-  US-
  -  [         R                  " US-  * S-  5      -  [        [        U5      -  -   -  nS nS n[         R                  " U5      [
        R                  " X* :„  XU4XV5      -   $ )z8
Return the log of the PDF of the crystalball function.
r•   r   rW   rÑ   c                 ó   • U S-  * S-  $ rD  r�   rÔ  s      r6   rÕ  Ú$crystalball_gen._logpdf.<locals>.rhs²-  s   € Ø�q‘D�5˜‘7ˆNr8   c                 óŽ   • U[         R                  " X!-  5      -  US-  S-  -
  U[         R                  " X!-  U-
  U -
  5      -  -
  $ rD  rg  rÔ  s      r6   rØ  Ú$crystalball_gen._logpdf.<locals>.lhsµ-  sB   € Ø”R—V’V˜A™F“^Ñ# d¨A¡g¨a¡iÑ/°!´B·F²F¸1¹6ÀD¹=È1Ñ;LÓ4MÑ2MÑMÐMr8   )rQ   rÒ   rÓ   rÛ   r  r#  r$  rÛ  s          r6   rü   Úcrystalball_gen._logpdf«-  sx   € ð �1‘6˜Q˜q™S‘>¤B§F¢F¨D°!©G¨8°c©>Ó$:Ñ:Ü¤¨4£Ñ0ñ1ñ 2ˆò	ò	Nô �vŠv�a‹yœ3Ÿ?š?¨1¨u©9°qÀ°lÀCÓMÑMÐMr8   c                 óÊ   • SX2-  US-
  -  [         R                  " US-  * S-  5      -  [        [        U5      -  -   -  nS nS nU[        R
                  " X* :„  XU4XV5      -  $ )z(
Return CDF of the crystalball function
r•   r   rW   rÑ   c                 ó’   • X!-  [         R                  " US-  * S-  5      -  US-
  -  [        [        U 5      [        U* 5      -
  -  -   $ ©NrW   rÑ   r   ©rQ   rÒ   rÓ   rÛ   rÔ  s      r6   rÕ  Ú!crystalball_gen._cdf.<locals>.rhsÁ-  sL   € Ø‘VœrŸvšv t¨Q¡w h°¡nÓ5Ñ5¸¸1¹Ñ=Ü¤9¨Q£<´)¸T¸EÓ2BÑ#BÑCñDð Er8   c                 ó|   • X!-  U-  [         R                  " US-  * S-  5      -  X!-  U-
  U -
  U* S-   -  -  US-
  -  $ rå  rP  rÔ  s      r6   rØ  Ú!crystalball_gen._cdf.<locals>.lhsÅ-  sR   € Ø‘V˜a‘K¤"§&¢&¨$°©'¨°C©Ó"8Ñ8Ø‘V˜d‘] QÑ&¨1¨"¨Q©$Ñ/ñ0Ø34°Q±3ñ8ð 9r8   rÚ  rÛ  s          r6   r{   Úcrystalball_gen._cdfº-  sp   € ð �1‘6˜Q˜q™S‘>¤B§F¢F¨D°!©G¨8°c©>Ó$:Ñ:Ü¤¨4£Ñ0ñ1ñ 2ˆò	Eò	9ð ”3—?’? 1 u¡9¨q¸¨l¸CÓEÑEÐEr8   c                 óP   ^ • S nU 4S jn[         R                  " X* :„  XU4XE5      $ )z4
Survival function of the crystalball distribution.
c                 ó¢   • X!-  US-
  -  [         R                  " US-  * S-  5      -  [        [        U5      -  -   n[        [	        U 5      -  U-  $ rf  )rQ   rÒ   rÓ   rÛ   rå   )rv   r­  r  ÚMs       r6   rÕ  Ú crystalball_gen._sf.<locals>.rhsÐ-  sK   € à‘˜˜A™‘œrŸvšv t¨Q¡w h¨q¡jÓ1Ñ1´KÄ	È$ÃÑ4OÑOˆAÜœx¨›{Ñ*¨1Ñ,Ð,r8   c                 ó.   >• STR                  XU5      -
  $ ra   rü	  )rv   r­  r  rE   s      €r6   rØ  Ú crystalball_gen._sf.<locals>.lhsÕ-  s   ø€ à�t—y‘y ¨!Ó,Ñ,Ð,r8   rK  )rE   rv   r­  r  rÕ  rØ  s   `     r6   r€   Úcrystalball_gen._sfË-  s*   ø€ ò
	-õ
	-ô �Š˜q 5™y¨1°A¨,¸ÓAÐAr8   c                 ó  • SX2-  US-
  -  [         R                  " US-  * S-  5      -  [        [        U5      -  -   -  nXCU-  -  [         R                  " US-  * S-  5      -  US-
  -  nS nS n[        R
                  " X:  XU4Xg5      $ )Nr•   r   rW   rÑ   c                 óÖ   • [         R                  " US-  * S-  5      nX!-  U-  US-
  -  nSU[        [        U5      -  -   -  nX!-  U-
  US-
  X!-  U* -  -  U-  U -  U-  SSU-
  -  -  -
  $ r  ræ  ©rV  r­  r  Úeb2r.  r	  s         r6   Úppf_lessÚ&crystalball_gen._ppf.<locals>.ppf_lessà-  s‹   € Ü—&’&˜$ ™'˜ !™Ó$ˆCØ‘˜3‘ ! A¡#Ñ&ˆAØ�1”{¤Y¨t£_Ñ4Ñ4Ñ5ˆAØ‘F˜T‘MØ˜!‘e˜a™f¨¨™^Ñ+¨CÑ/°Ñ1°!Ñ3°q¸!¸A¹#±wÑ?ñ@ð Ar8   c                 óÔ   • [         R                  " US-  * S-  5      nX!-  U-  US-
  -  nSU[        [        U5      -  -   -  n[	        [        U* 5      S[        -  X-  U-
  -  -   5      $ r  )rQ   rÒ   rÓ   rÛ   râ   rô  s         r6   Úppf_greaterÚ)crystalball_gen._ppf.<locals>.ppf_greaterç-  sl   € Ü—&’&˜$ ™'˜ !™Ó$ˆCØ‘˜3‘ ! A¡#Ñ&ˆAØ�1”{¤Y¨t£_Ñ4Ñ4Ñ5ˆAÜœY¨ uÓ-°´;±ÀÁÀqÁÑ0IÑIÓJÐJr8   rÚ  )rE   rV  r­  r  r	  Úpbetarö  rù  s           r6   r†   Úcrystalball_gen._ppfÛ-  s”   € Ø�1‘6˜Q˜q™S‘>¤B§F¢F¨D°!©G¨8°c©>Ó$:Ñ:Ü¤¨4£Ñ0ñ1ñ 2ˆà�t‘V‘œrŸvšv t¨Q¡w h¨q¡jÓ1Ñ1°Q¸±UÑ;ˆò	Aò	Kô �Š˜q™y¨1°A¨,¸ÓNÐNr8   c           
      ó(  • SX2-  US-
  -  [         R                  " US-  * S-  5      -  [        [        U5      -  -   -  nS nU[        R
                  " US-   U:  XU4[         R                  " U[         R                  /S9[         R                  S9-  $ )zB
Returns the n-th non-central moment of the crystalball function.
r•   r   rW   rÑ   c                 ó
  • X!-  U-  [         R                  " US-  * S-  5      -  nX!-  U-
  nSU S-
  S-  -  [        R                  " U S-   S-  5      -  SSU -  [        R                  " U S-   S-  US-  S-  5      -  -   -  n[         R
                  " UR                  5      n[        [        U 5      S-   5       HA  nU[        R                  " X5      X@U-
  -  -  SU-  -  X'-
  S-
  -  X!-  U* U-   S-   -  -  -  nMC     X6-  U-   $ )z_
Returns n-th moment. Defined only if n+1 < m
Function cannot broadcast due to the loop over n
rW   rÑ   r   r•   r  )
rQ   rÒ   r~   r6  rV  r	  rj  r`  r*  Úbinom)re   r­  r  r
  r  rÕ  rØ  rz  s           r6   r~  Ú*crystalball_gen._munp.<locals>.n_th_momentö-  s  € ð
 ‘˜!‘œbŸfšf d¨A¡g X°¡^Ó4Ñ4ˆAØ‘˜‘ˆAØ˜˜!™˜S‘y‘>¤B§H¢H¨a°©c°1©WÓ$5Ñ5Ø˜2 ™'¤B§K¢K°°1±°a±¸¸q¹À1¹Ó$EÑEÑEñGˆCä—(’(˜3Ÿ9™9Ó%ˆCÜœ3˜q›6 A™:Ö&�ØœŸš ›¨¨q©S©Ñ1°R¸!±GÑ;¸q¹uÀq¹yÑIØ™ A 2¨¡6¨A¡:Ñ.ñ/ñ 0’ñ 'ð ‘7˜S‘=Ð r8   r@  r  )	rQ   rÒ   rÓ   rÛ   r#  r$  r7  rC  rm   )rE   re   r­  r  r	  r~  s         r6   r+  Úcrystalball_gen._munpï-  s�   € ð �1‘6˜Q˜q™S‘>¤B§F¢F¨D°!©G¨8°c©>Ó$:Ñ:Ü¤¨4£Ñ0ñ1ñ 2ˆò	!ð ”3—?’? 1 q¡5¨1¡9¨q¸¨lÜ#%§<¢<°ÄRÇZÁZÀLÑ#QÜ.0¯f©fñ6ñ 6ð 	6r8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   rÝ  rw   rü   r{   r€   r†   r+  r“   r-  r.  s   @r6   rÉ  rÉ  b-  s@   ø† ñ"òF$òõ
6òFò,NòFò"Bò O÷(6ð 6r8   rÉ  ÚcrystalballzA Crystalball Function)r™   Úlongnamec                 óB   • [         R                  " SU S-  S-  5      S-  $ )a‘  
Utility function for the argus distribution used in the pdf, sf and
moment calculation.
Note that for all x > 0:
gammainc(1.5, x**2/2) = 2 * (_norm_cdf(x) - x * _norm_pdf(x) - 0.5).
This can be verified directly by noting that the cdf of Gamma(1.5) can
be written as erf(sqrt(x)) - 2*sqrt(x)*exp(-x)/sqrt(Pi).
We use gammainc instead of the usual definition because it is more precise
for small chi.
rg  rW   rU  )rz  s    r6   Ú
_argus_phir  .  s"   € ô �;Š;�s˜C ™F 1™HÓ%¨Ñ)Ð)r8   c                   óP   • \ rS rSrSrS rS rS rS rS r	SS	 jr
SS
 jrS rSrg)Ú	argus_geni.  aª  
Argus distribution

%(before_notes)s

Notes
-----
The probability density function for `argus` is:

.. math::

    f(x, \chi) = \frac{\chi^3}{\sqrt{2\pi} \Psi(\chi)} x \sqrt{1-x^2}
                 \exp(-\chi^2 (1 - x^2)/2)

for :math:`0 < x < 1` and :math:`\chi > 0`, where

.. math::

    \Psi(\chi) = \Phi(\chi) - \chi \phi(\chi) - 1/2

with :math:`\Phi` and :math:`\phi` being the CDF and PDF of a standard
normal distribution, respectively.

`argus` takes :math:`\chi` as shape a parameter. Details about sampling
from the ARGUS distribution can be found in [2]_.

%(after_notes)s

References
----------
.. [1] "ARGUS distribution",
       https://en.wikipedia.org/wiki/ARGUS_distribution
.. [2] Christoph Baumgarten "Random variate generation by fast numerical
       inversion in the varying parameter case." Research in Statistics,
       vol. 1, 2023. :doi:`10.1080/27684520.2023.2279060`

.. versionadded:: 0.19.0

%(example)s
c                 ó@   • [        SSS[        R                  4S5      /$ )Nrz  Fr   r3  rl   rn   s    r6   ro   Úargus_gen._shape_infoD.  ó   € Ü˜5 %¨!¬R¯V©V¨°nÓEÐFÐFr8   c                 ót  • [         R                  " SS9   SX-  -
  nS[         R                  " U5      -  [        -
  [         R                  " [	        U5      5      -
  nU[         R                  " U5      -   S[         R
                  " U* U-  5      -  -   US-  U-  S-  -
  sS S S 5        $ ! , (       d  f       g = f)Nrp  rq  r•   rÌ  r£   rW   )rQ   rs  r  r×   r  rï  )rE   rv   rz  r�  r
  s        r6   rü   Úargus_gen._logpdfG.  s…   € ä�[Š[ Ó)Ø�a‘c‘	ˆAØ”"—&’&˜“+‘¤Ñ.´·²¼
À3»Ó1HÑHˆAØ”r—v’v˜a“y‘= 3¤r§x¢x°°°1±£~Ñ#5Ñ5¸¸Q¹À¹
ÀQ¹ÑF÷ *×)×)ús   •B
B)Â)
B7c                 óL   • [         R                  " U R                  X5      5      $ rO   r<  ©rE   rv   rz  s      r6   rw   Úargus_gen._pdfN.  s   € Ü�vŠv�d—l‘l 1Ó*Ó+Ð+r8   c                 ó*   • SU R                  X5      -
  $ r>  rR	  r  s      r6   r{   Úargus_gen._cdfQ.  s   € Ø�T—X‘X˜aÓ%Ñ%Ð%r8   c                 óp   • [        U[        R                  " SU-
  SU-   -  5      -  5      [        U5      -  $ ra   )r  rQ   r&  r  s      r6   r€   Úargus_gen._sfT.  s0   € Ü˜#¤§¢¨¨Q©°°Q±©Ó 8Ñ8Ó9¼JÀs»OÑKÐKr8   Nc                 óh  ^	^
• [         R                  " U5      nUR                  S:X  a  U R                  XUS9nOí[	        UR
                  U5      u  nm	[        [         R                  " U5      5      n[         R                  " U5      n[         R                  " U/S/S//S9m
T
R                  (       dt  [        U	U
4S j[        [        U5      * S5       5       5      nU R                  T
S   UUS9nUR                  U5      XG'   T
R                  5         T
R                  (       d  Mt  US:X  a  US   nU$ )	Nr   )r 	  rô   rë  rì  rí  c              3   ól   >#   • U  H)  nTU   (       d  TR                   U   O
[        S 5      v •  M+     g 7frO   rñ  ró  s     €€r6   rg  Ú!argus_gen._rvs.<locals>.<genexpr>d.  r÷  rø  r   r�   )rQ   r"  ró   rù  r   rj  r*  r_  rú  rû  rü  rý  r`  rí  rÂ  rþ  )rE   rz  ró   rô   rX  rÿ  r 	  r	  rW  rô  rõ  s            @@r6   rõ   Úargus_gen._rvsW.  s  ù€ Ü�jŠj˜‹oˆØ�8‰8�q‹=Ø×"Ñ" 3Ø0<ð #ð >‰Cô # 3§9¡9¨dÓ3‰GˆC�ÜœRŸWšW S›\Ó*ˆJÜ—(’(˜4“.ˆCÜ—’˜C˜5Ø"/ Ø&0 \ Nñ4ˆBð —k—kÜõ ;Ü%*¬C°«I¨:°qÔ%9ó;ó ;�à×$Ñ$ R¨¡U°zØ2>ð %ð @�àŸ9™9 S›>�‘Ø—‘”ð —k—k‘kð �2‹:Ø�b‘'ˆCØˆ
r8   c                 ó|  • [        [        R                  " U5      5      n[        [        R                  " U5      5      n[        R
                  " U5      nSnX-  nUS::  a—  U* S-  n	Xu:  aŠ  XW-
  n
UR                  U
S9nUR                  U
S9nUS-  n[        R                  " U5      X�-  :*  n[        R                  " U5      nUS:”  a%  [        R                  " SXÞ   -
  5      nUXgX-   & X-  nXu:  a  MŠ  GO0US::  aº  [        R                  " U* S-  5      nXu:  aš  XW-
  n
UR                  U
S9nUR                  U
S9nS[        R                  " USU-
  -  U-   5      -  U-  nUS-  U-   S:*  n[        R                  " U5      nUS:”  a%  [        R                  " SXÞ   -   5      nUXgX-   & X-  nXu:  a  Mš  OpXu:  aL  XW-
  n
UR                  SU
S9nUUS-  :*  n[        R                  " U5      nUS:”  a  UU   XgX-   & X-  nXu:  a  ML  [        R                  " SSU-  U-  -
  5      n[        R                  " Xd5      $ )	Nr   r£   rW   rÊ  r˜  r   gÍÌÌÌÌÌü?rg  )rý  rQ   r	  r*  r_  r	  rË  r  rî  r&  rÒ   r¦  rÂ  )rE   rz  r 	  rô   r	  r	  rv   r	  rJ  r'  rz  rÌ  r%  rë  r#	  r$	  r7  Úechirj  s                      r6   rù  Úargus_gen._rvs_scalaro.  sE  € ôh ”r—}’} ZÓ0Ó1ˆÜ”—’˜“Ó ˆÜ�HŠH�Q‹KˆØˆ	Ø‰yˆØ�#‹:Ø�˜‘	ˆAØ“-Ø‘M�Ø ×(Ñ(¨aÐ(Ð0�Ø ×(Ñ(¨aÐ(Ð0�Ø˜‘H�äŸ&š& ›) q¡uÑ,�ÜŸVšV F›^�
Ø “>äŸ'š' ! a¡i¡-Ó0�CØ<?�A Ñ!7Ð9ØÑ+�Ið •-ùð �C‹ZÜ—6’6˜4˜% !™)Ó$ˆDØ“-Ø‘M�Ø ×(Ñ(¨aÐ(Ð0�Ø ×(Ñ(¨aÐ(Ð0�ØœŸš˜t q¨1¡u™~°Ñ1Ó2Ñ2°TÑ9�ð ˜Q™$ ™( a™-�ÜŸVšV F›^�
Ø “>ÜŸ'š' ! a¡i¡-Ó0�CØ<?�A Ñ!7Ð9ØÑ+�Ið •-øð “-Ø‘M�Ø ×/Ñ/°¸!Ð/Ð<�Ø˜t a™x™-�ÜŸVšV F›^�
Ø “>Ø<=¸f¹I�A Ñ!7Ð9ØÑ+�Ið •-ô —’˜˜A ™E D™LÑ(Ó)ˆAä�zŠz˜!Ó$Ð$r8   c                 óº  • [         R                  " U[        S9n[        U5      n[         R                  " [         R
                  S-  5      U-  [        R                  " SUS-  S-  5      -  U-  n[         R                  " U5      nUS:„  nX   nSSUS-  -  -
  U[        U5      -  X%   -  -   XE'   X)    n/ SQn[         R                  " Xv5      XE) '   X4US-  -
  S S 4$ )	Nr3	  rb  r   rW   rU  gš™™™™™¹?rÌ  )	g„_1gªÛÖ¾r   gWB³éa¿r   g½p|R÷H?r   gE'«å�¡?r   gš™™™™™Ù?)rQ   r"  r  r  r&  r  r~   r  rh  rÕ   r   )rE   rz  r	  r  r~  rç  rj  Úcoefs           r6   r   Úargus_gen._statsÔ.  sÐ   € ô �jŠj˜¤EÑ*ˆÜ˜‹oˆÜ�GŠG”B—E‘E˜!‘GÓ˜sÑ"¤R§V¢V¨A¨s°A©v°a©xÓ%8Ñ8¸3Ñ>ˆä�mŠm˜CÓ ˆØ�S‰yˆØ‰IˆØ˜˜A˜q™D™‘L 1¤y°£|Ñ#3°c±iÑ#?Ñ?ˆ‰	Ø�‰JˆÚKˆÜ—Z’Z Ó(ˆˆE‰
Ø˜˜1™‘*˜d DÐ(Ð(r8   r�   r-  )rŽ   r�   r�   r‘   r’   ro   rü   rw   r{   r€   rõ   rù  r   r“   r�   r8   r6   r  r  .  s5   † ñ'òPGòGò,ò&òLôô0c%õJ)r8   r  ÚarguszAn Argus Function)r™   r  r—   r˜   c                   óv   ^ • \ rS rSrSr\R                  rSS.U 4S jjrS rS r	S r
S	 rS
 rU 4S jrSrU =r$ )Úrv_histogramiè.  a  
Generates a distribution given by a histogram.
This is useful to generate a template distribution from a binned
datasample.

As a subclass of the `rv_continuous` class, `rv_histogram` inherits from it
a collection of generic methods (see `rv_continuous` for the full list),
and implements them based on the properties of the provided binned
datasample.

Parameters
----------
histogram : tuple of array_like
    Tuple containing two array_like objects.
    The first containing the content of n bins,
    the second containing the (n+1) bin boundaries.
    In particular, the return value of `numpy.histogram` is accepted.

density : bool, optional
    If False, assumes the histogram is proportional to counts per bin;
    otherwise, assumes it is proportional to a density.
    For constant bin widths, these are equivalent, but the distinction
    is important when bin widths vary (see Notes).
    If None (default), sets ``density=True`` for backwards compatibility,
    but warns if the bin widths are variable. Set `density` explicitly
    to silence the warning.

    .. versionadded:: 1.10.0

Notes
-----
When a histogram has unequal bin widths, there is a distinction between
histograms that are proportional to counts per bin and histograms that are
proportional to probability density over a bin. If `numpy.histogram` is
called with its default ``density=False``, the resulting histogram is the
number of counts per bin, so ``density=False`` should be passed to
`rv_histogram`. If `numpy.histogram` is called with ``density=True``, the
resulting histogram is in terms of probability density, so ``density=True``
should be passed to `rv_histogram`. To avoid warnings, always pass
``density`` explicitly when the input histogram has unequal bin widths.

There are no additional shape parameters except for the loc and scale.
The pdf is defined as a stepwise function from the provided histogram.
The cdf is a linear interpolation of the pdf.

.. versionadded:: 0.19.0

Examples
--------

Create a scipy.stats distribution from a numpy histogram

>>> import scipy.stats
>>> import numpy as np
>>> data = scipy.stats.norm.rvs(size=100000, loc=0, scale=1.5,
...                             random_state=123)
>>> hist = np.histogram(data, bins=100)
>>> hist_dist = scipy.stats.rv_histogram(hist, density=False)

Behaves like an ordinary scipy rv_continuous distribution

>>> hist_dist.pdf(1.0)
0.20538577847618705
>>> hist_dist.cdf(2.0)
0.90818568543056499

PDF is zero above (below) the highest (lowest) bin of the histogram,
defined by the max (min) of the original dataset

>>> hist_dist.pdf(np.max(data))
0.0
>>> hist_dist.cdf(np.max(data))
1.0
>>> hist_dist.pdf(np.min(data))
7.7591907244498314e-05
>>> hist_dist.cdf(np.min(data))
0.0

PDF and CDF follow the histogram

>>> import matplotlib.pyplot as plt
>>> X = np.linspace(-5.0, 5.0, 100)
>>> fig, ax = plt.subplots()
>>> ax.set_title("PDF from Template")
>>> ax.hist(data, density=True, bins=100)
>>> ax.plot(X, hist_dist.pdf(X), label='PDF')
>>> ax.plot(X, hist_dist.cdf(X), label='CDF')
>>> ax.legend()
>>> fig.show()

N)Údensityc                óž  >• Xl         X l        [        U5      S:w  a  [        S5      e[        R
                  " US   5      U l        [        R
                  " US   5      U l        [        U R                  5      S-   [        U R                  5      :w  a  [        S5      eU R                  SS U R                  SS -
  U l        [        R                  " U R                  U R                  S   5      (       + nUc&  U(       a  Sn[        R                  " U[        SS	9  S
nO%U(       d  U R                  U R                  -  U l        U R                  [        [        R                  " U R                  U R                  -  5      5      -  U l        [        R                  " U R                  U R                  -  5      U l        [        R"                  " SU R                  S/5      U l        [        R"                  " SU R                   /5      U l        U R                  S   =US'   U l        U R                  S   =US'   U l        [(        TU ]T  " U0 UD6  g)aµ  
Create a new distribution using the given histogram

Parameters
----------
histogram : tuple of array_like
    Tuple containing two array_like objects.
    The first containing the content of n bins,
    the second containing the (n+1) bin boundaries.
    In particular, the return value of np.histogram is accepted.
density : bool, optional
    If False, assumes the histogram is proportional to counts per bin;
    otherwise, assumes it is proportional to a density.
    For constant bin widths, these are equivalent.
    If None (default), sets ``density=True`` for backward
    compatibility, but warns if the bin widths are variable. Set
    `density` explicitly to silence the warning.
rW   z)Expected length 2 for parameter histogramr   r   zbNumber of elements in histogram content and histogram boundaries do not match, expected n and n+1.Nr  zjBin widths are not constant. Assuming `density=True`.Specify `density` explicitly to silence this warning.rÕ  Tr”   r—   r˜   )Ú
_histogramÚ_densityrí  r!  rQ   r"  Ú_hpdfÚ_hbinsÚ_hbin_widthsÚallcloser×  rØ  rÙ  r  rî  ÚcumsumÚ_hcdfÚhstackr—   r˜   rA   rŒ  )rE   Ú	histogramr!  rG   rä  Ú	bins_varyrÛ  rÞ  s          €r6   rŒ  Úrv_histogram.__init__F/  sÆ  ø€ ð& $ŒØŒÜˆy‹>˜QÓÜÐHÓIÐIÜ—Z’Z 	¨!¡Ó-ˆŒ
Ü—j’j ¨1¡Ó.ˆŒÜˆt�z‰z‹?˜QÑ¤# d§k¡kÓ"2Ó2Üð 3ó 4ð 4ð !ŸK™K¨¨˜O¨d¯k©k¸#¸2Ð.>Ñ>ˆÔÜŸš D×$5Ñ$5°t×7HÑ7HÈÑ7KÓLÔLˆ	Ø‰?žyðOˆGä�MŠM˜'¤>¸aÒ@Ø‰GÞØŸ™ d×&7Ñ&7Ñ7ˆDŒJà—Z‘Z¤%¬¯ª¨t¯z©z¸D×<MÑ<MÑ/MÓ(NÓ"OÑOˆŒ
Ü—Y’Y˜tŸz™z¨D×,=Ñ,=Ñ=Ó>ˆŒ
Ü—Y’Y  T§Z¡Z°Ð5Ó6ˆŒ
Ü—Y’Y  T§Z¡ZÐ0Ó1ˆŒ
à#Ÿ{™{¨1™~Ð-ˆˆs‰�d”fØ#Ÿ{™{¨2™Ð.ˆˆs‰�d”fÜ‰Ò˜$Ð) &Ó)r8   c                 ó\   • U R                   [        R                  " U R                  USS9   $ )z
PDF of the histogram
rY	  )Úside)r%  rQ   Úsearchsortedr&  r¿   s     r6   rw   Úrv_histogram._pdfv/  s$   € ð �z‰zœ"Ÿ/š/¨$¯+©+°q¸wÑGÑHÐHr8   c                 óX   • [         R                  " XR                  U R                  5      $ )z#
CDF calculated from the histogram
)rQ   Úinterpr&  r*  r¿   s     r6   r{   Úrv_histogram._cdf|/  s   € ô �yŠy˜ŸK™K¨¯©Ó4Ð4r8   c                 óX   • [         R                  " XR                  U R                  5      $ )z3
Percentile function calculated from the histogram
)rQ   r4  r*  r&  r¿   s     r6   r†   Úrv_histogram._ppf‚/  s   € ô �yŠy˜ŸJ™J¨¯©Ó4Ð4r8   c                 ó°   • U R                   SS US-   -  U R                   SS US-   -  -
  US-   -  n[        R                  " U R                  SS U-  5      $ )z$Compute the n-th non-central moment.r   Nr  )r&  rQ   rî  r%  )rE   re   Ú	integralss      r6   r+  Úrv_histogram._munpˆ/  s[   € à—[‘[  �_ q¨¡sÑ+¨d¯k©k¸#¸2Ð.>ÀÀ1ÁÑ.EÑEÈ!ÈAÉ#ÑNˆ	Ü�vŠv�d—j‘j  2Ð&¨Ñ2Ó3Ð3r8   c                 ó¼   • U R                   SS n[        R                  " US:„  U[        R                  SS9n[        R
                  " X-  U R                  -  5      * $ )zCompute entropy of distributionr   r  r”   r  )r%  r#  r$  rQ   r  rî  r'  )rE   Úhpdfr¾  s      r6   r  Úrv_histogram._entropy�/  sM   € à�z‰z˜!˜BÐˆÜ�oŠo˜d S™j¨$´·±À3ÑGˆÜ—’�t‘z D×$5Ñ$5Ñ5Ó6Ð6Ð6r8   c                 ó`   >• [         TU ]  5       nU R                  US'   U R                  US'   U$ )z6
Set the histogram as additional constructor argument
r,  r!  )rA   Ú_updated_ctor_paramr#  r$  )rE   ÚdctrÞ  s     €r6   r?  Ú rv_histogram._updated_ctor_param“/  s2   ø€ ô ‰gÑ)Ó+ˆØŸ?™?ˆˆKÑØŸ™ˆˆI‰Øˆ
r8   )r$  r'  r&  r*  r#  r%  r—   r˜   )rŽ   r�   r�   r‘   r’   r   rJ  rŒ  rw   r{   r†   r+  r  r?  r“   r-  r.  s   @r6   r   r   è.  sI   ø† ñZðv "×/Ñ/€Mà15÷ .*ð .*ò`Iò5ò5ò4ò
7÷ó r8   r   c                   óJ   ^ • \ rS rSrSrS rS rU 4S jrS rS r	S r
S	rU =r$ )
Ústudentized_range_geni�/  u  A studentized range continuous random variable.

%(before_notes)s

See Also
--------
t: Student's t distribution

Notes
-----
The probability density function for `studentized_range` is:

.. math::

     f(x; k, \nu) = \frac{k(k-1)\nu^{\nu/2}}{\Gamma(\nu/2)
                    2^{\nu/2-1}} \int_{0}^{\infty} \int_{-\infty}^{\infty}
                    s^{\nu} e^{-\nu s^2/2} \phi(z) \phi(sx + z)
                    [\Phi(sx + z) - \Phi(z)]^{k-2} \,dz \,ds

for :math:`x â‰¥ 0`, :math:`k > 1`, and :math:`\nu > 0`.

`studentized_range` takes ``k`` for :math:`k` and ``df`` for :math:`\nu`
as shape parameters.

When :math:`\nu` exceeds 100,000, an asymptotic approximation (infinite
degrees of freedom) is used to compute the cumulative distribution
function [4]_ and probability distribution function.

%(after_notes)s

References
----------

.. [1] "Studentized range distribution",
       https://en.wikipedia.org/wiki/Studentized_range_distribution
.. [2] Batista, Ben DÃªivide, et al. "Externally Studentized Normal Midrange
       Distribution." CiÃªncia e Agrotecnologia, vol. 41, no. 4, 2017, pp.
       378-389., doi:10.1590/1413-70542017414047716.
.. [3] Harter, H. Leon. "Tables of Range and Studentized Range." The Annals
       of Mathematical Statistics, vol. 31, no. 4, 1960, pp. 1122-1147.
       JSTOR, www.jstor.org/stable/2237810. Accessed 18 Feb. 2021.
.. [4] Lund, R. E., and J. R. Lund. "Algorithm AS 190: Probabilities and
       Upper Quantiles for the Studentized Range." Journal of the Royal
       Statistical Society. Series C (Applied Statistics), vol. 32, no. 2,
       1983, pp. 204-210. JSTOR, www.jstor.org/stable/2347300. Accessed 18
       Feb. 2021.

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

Display the probability density function (``pdf``):

>>> k, df = 3, 10
>>> x = np.linspace(studentized_range.ppf(0.01, k, df),
...                 studentized_range.ppf(0.99, k, df), 100)
>>> ax.plot(x, studentized_range.pdf(x, k, df),
...         'r-', lw=5, alpha=0.6, label='studentized_range pdf')

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

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

>>> rv = studentized_range(k, df)
>>> ax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')

Check accuracy of ``cdf`` and ``ppf``:

>>> vals = studentized_range.ppf([0.001, 0.5, 0.999], k, df)
>>> np.allclose([0.001, 0.5, 0.999], studentized_range.cdf(vals, k, df))
True

Rather than using (``studentized_range.rvs``) to generate random variates,
which is very slow for this distribution, we can approximate the inverse
CDF using an interpolator, and then perform inverse transform sampling
with this approximate inverse CDF.

This distribution has an infinite but thin right tail, so we focus our
attention on the leftmost 99.9 percent.

>>> a, b = studentized_range.ppf([0, .999], k, df)
>>> a, b
0, 7.41058083802274

>>> from scipy.interpolate import interp1d
>>> rng = np.random.default_rng()
>>> xs = np.linspace(a, b, 50)
>>> cdf = studentized_range.cdf(xs, k, df)
# Create an interpolant of the inverse CDF
>>> ppf = interp1d(cdf, xs, fill_value='extrapolate')
# Perform inverse transform sampling using the interpolant
>>> r = ppf(rng.uniform(size=1000))

And compare the histogram:

>>> ax.hist(r, density=True, histtype='stepfilled', alpha=0.2)
>>> ax.legend(loc='best', frameon=False)
>>> plt.show()

c                 ó   • US:„  US:„  -  $ rÃ  r�   )rE   rz  rF  s      r6   rf   Ústudentized_range_gen._argcheck0  s   € Ø�A‘˜"˜q™&Ñ!Ð!r8   c                 ó€   • [        SSS[        R                  4S5      n[        SSS[        R                  4S5      nX/$ )Nrz  Fr   r3  rF  r   rl   )rE   rW  r%  s      r6   ro   Ú!studentized_range_gen._shape_info0  s:   € Ü˜˜U Q¬¯© K°Ó@ˆÜ˜˜u q¬"¯&©& k°>ÓBˆØˆyÐr8   c                 ó    >• [         TU ]  USS9$ )N)rW   r   r‰  r  r€  s     €r6   rÝ  Ústudentized_range_gen._fitstart0  s   ø€ ä‰wÑ  ¨FÐ Ð3Ð3r8   c                 óÌ   ^^^• SmU R                  5       u  mmUUU4S jn[        R                  " USS5      n[        R                  " U" XU5      [        R                  S9S   $ )NÚ_studentized_range_momentc                 ó¤  >• [         R                  " X5      nXX#/n[        R                  " U[        5      R
                  R                  [
        R                  5      n[        R                  " [         TU5      n[        R                  * [        R                  4S[        R                  4T	T
4/n[        SSS9n[        R                  " XgUS9S   $ )Nr   r˜  çê-�™—q=©rH  rG  ©ÚrangesÚopts)r   Ú_studentized_range_pdf_logconstrQ   rI  r  rJ  rK  rL  r   rM  rm   Údictr   Únquad)rq  rz  rF  Ú	log_constÚargÚusr_datarS  rP  rQ  rA  r@  Úcython_symbols            €€€r6   Ú_single_momentÚ3studentized_range_gen._munp.<locals>._single_moment0  sŸ   ø€ Ü×>Ò>¸qÓEˆIØ˜Ð'ˆCÜ—x’x ¤UÓ+×2Ñ2×:Ñ:¼6¿?¹?ÓKˆHä"×.Ò.¬v°}ÀhÓOˆCäŸ™�w¤§¡Ð'¨!¬R¯V©V¨°r¸2°hÐ?ˆFÜ˜u¨UÑ3ˆDä—?’? 3¸DÑAÀ!ÑDÐDr8   rÌ  r   r3	  r�   )r¥   rQ   Ú
frompyfuncr"  rC  )	rE   rq  rz  rF  rY  ÚufuncrA  r@  rX  s	         @@@r6   r+  Ústudentized_range_gen._munp0  sT   ú€ Ø3ˆØ×"Ñ"Ó$‰ˆˆB÷
	Eô —’˜n¨a°Ó3ˆÜ�zŠz™%  b›/´·±Ñ<¸RÑ@Ð@r8   c                 ó’   • S n[         R                  " USS5      n[         R                  " U" XU5      [         R                  S9S   $ )Nc                 ó~  • US:  a’  Sn[         R                  " X5      nXX$/n[        R                  " U[        5      R
                  R                  [
        R                  5      n[        R                  * [        R                  4S[        R                  4/nOiSnX/n[        R                  " U[        5      R
                  R                  [
        R                  5      n[        R                  * [        R                  4/n[        R                  " [         X65      n[        SSS9n	[        R                  " X‡U	S9S   $ )	Né † Ú_studentized_range_pdfr   Ú!_studentized_range_pdf_asymptoticr˜  rM  rN  rO  )r   rR  rQ   rI  r  rJ  rK  rL  rm   r   rM  rS  r   rT  ©
r…   rz  rF  rX  rU  rV  rW  rP  rS  rQ  s
             r6   Ú_single_pdfÚ/studentized_range_gen._pdf.<locals>._single_pdf+0  sï   € ð �F‹{Ø 8�Ü"×BÒBÀ1ÓI�	Ø˜RÐ+�ÜŸ8š8 C¬Ó/×6Ñ6×>Ñ>¼v¿¹ÓO�ÜŸF™F˜7¤B§F¡FÐ+¨a´·±¨[Ð9‘ð !D�Ø�f�ÜŸ8š8 C¬Ó/×6Ñ6×>Ñ>¼v¿¹ÓO�ÜŸF™F˜7¤B§F¡FÐ+Ð,�ä"×.Ò.¬v°}ÓOˆCÜ˜u¨UÑ3ˆDÜ—?’? 3¸DÑAÀ!ÑDÐDr8   rÌ  r   r3	  r�   )rQ   r[  r"  rC  )rE   rv   rz  rF  rd  r\  s         r6   rw   Ústudentized_range_gen._pdf)0  s<   € ò	Eô( —’˜k¨1¨aÓ0ˆÜ�zŠz™%  b›/´·±Ñ<¸RÑ@Ð@r8   c           	      ó¾   • S n[         R                  " USS5      n[         R                  " [         R                  " U" XU5      [         R                  S9S   SS5      $ )Nc                 ó~  • US:  a’  Sn[         R                  " X5      nXX$/n[        R                  " U[        5      R
                  R                  [
        R                  5      n[        R                  * [        R                  4S[        R                  4/nOiSnX/n[        R                  " U[        5      R
                  R                  [
        R                  5      n[        R                  * [        R                  4/n[        R                  " [         X65      n[        SSS9n	[        R                  " X‡U	S9S   $ )	Nr`  Ú_studentized_range_cdfr   Ú!_studentized_range_cdf_asymptoticr˜  rM  rN  rO  )r   Ú_studentized_range_cdf_logconstrQ   rI  r  rJ  rK  rL  rm   r   rM  rS  r   rT  rc  s
             r6   Ú_single_cdfÚ/studentized_range_gen._cdf.<locals>._single_cdfD0  sï   € ð
 �F‹{Ø 8�Ü"×BÒBÀ1ÓI�	Ø˜RÐ+�ÜŸ8š8 C¬Ó/×6Ñ6×>Ñ>¼v¿¹ÓO�ÜŸF™F˜7¤B§F¡FÐ+¨a´·±¨[Ð9‘ð !D�Ø�f�ÜŸ8š8 C¬Ó/×6Ñ6×>Ñ>¼v¿¹ÓO�ÜŸF™F˜7¤B§F¡FÐ+Ð,�ä"×.Ò.¬v°}ÓOˆCÜ˜u¨UÑ3ˆDÜ—?’? 3¸DÑAÀ!ÑDÐDr8   rÌ  r   r3	  r�   r   )rQ   r[  rÉ  r"  rC  )rE   rv   rz  rF  rl  r\  s         r6   r{   Ústudentized_range_gen._cdfB0  sK   € ò	Eô, —’˜k¨1¨aÓ0ˆô �wŠw”r—z’z¡%¨¨b£/¼¿¹ÑDÀRÑHÈ!ÈQÓOÐOr8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   rÝ  r+  rw   r{   r“   r-  r.  s   @r6   rC  rC  �/  s1   ø† ñhòT"òõ
4òAò*A÷2Pð Pr8   rC  Ústudentized_range)r™   r—   r˜   c                   óf   ^ • \ rS rSrSrS rS rS rS rS r	S r
\" \5      U 4S	 j5       rS
rU =r$ )Úrel_breitwigner_genid0  aO  A relativistic Breit-Wigner random variable.

%(before_notes)s

See Also
--------
cauchy: Cauchy distribution, also known as the Breit-Wigner distribution.

Notes
-----

The probability density function for `rel_breitwigner` is

.. math::

    f(x, \rho) = \frac{k}{(x^2 - \rho^2)^2 + \rho^2}

where

.. math::
    k = \frac{2\sqrt{2}\rho^2\sqrt{\rho^2 + 1}}
        {\pi\sqrt{\rho^2 + \rho\sqrt{\rho^2 + 1}}}

The relativistic Breit-Wigner distribution is used in high energy physics
to model resonances [1]_. It gives the uncertainty in the invariant mass,
:math:`M` [2]_, of a resonance with characteristic mass :math:`M_0` and
decay-width :math:`\Gamma`, where :math:`M`, :math:`M_0` and :math:`\Gamma`
are expressed in natural units. In SciPy's parametrization, the shape
parameter :math:`\rho` is equal to :math:`M_0/\Gamma` and takes values in
:math:`(0, \infty)`.

Equivalently, the relativistic Breit-Wigner distribution is said to give
the uncertainty in the center-of-mass energy :math:`E_{\text{cm}}`. In
natural units, the speed of light :math:`c` is equal to 1 and the invariant
mass :math:`M` is equal to the rest energy :math:`Mc^2`. In the
center-of-mass frame, the rest energy is equal to the total energy [3]_.

%(after_notes)s

:math:`\rho = M/\Gamma` and :math:`\Gamma` is the scale parameter. For
example, if one seeks to model the :math:`Z^0` boson with :math:`M_0
\approx 91.1876 \text{ GeV}` and :math:`\Gamma \approx 2.4952\text{ GeV}`
[4]_ one can set ``rho=91.1876/2.4952`` and ``scale=2.4952``.

To ensure a physically meaningful result when using the `fit` method, one
should set ``floc=0`` to fix the location parameter to 0.

References
----------
.. [1] Relativistic Breit-Wigner distribution, Wikipedia,
       https://en.wikipedia.org/wiki/Relativistic_Breit-Wigner_distribution
.. [2] Invariant mass, Wikipedia,
       https://en.wikipedia.org/wiki/Invariant_mass
.. [3] Center-of-momentum frame, Wikipedia,
       https://en.wikipedia.org/wiki/Center-of-momentum_frame
.. [4] M. Tanabashi et al. (Particle Data Group) Phys. Rev. D 98, 030001 -
       Published 17 August 2018

%(example)s

c                 ó   • US:„  $ rö  r�   ©rE   Úrhos     r6   rf   Úrel_breitwigner_gen._argcheck¢0  s   € Ø�Q‰wˆr8   c                 ó@   • [        SSS[        R                  4S5      /$ )Nrt  Fr   r3  rl   rn   s    r6   ro   Úrel_breitwigner_gen._shape_info¥0  r
  r8   c           
      ó<  • [         R                  " SSSUS-  -  -   -  S[         R                  " SSUS-  -  -   5      -   -  5      S-  [         R                  -  n[         R                  " SS9   X1U-
  X-   -  U-  S-  S-   -  sS S S 5        $ ! , (       d  f       g = f)NrW   r   rp  r±  )rQ   r&  r  rs  )rE   rv   rt  r.  s       r6   rw   Úrel_breitwigner_gen._pdf¨0  s‘   € ä�GŠGØ��Q�s˜A‘v‘X‘Ñ !¤b§g¢g¨a°!°C¸±F±(©lÓ&;Ñ";Ñ<ó
àñä—‘ñˆô �[Š[˜hÓ'Ø˜c™' A¡GÑ,¨SÑ0°1Ñ4°qÑ8Ñ9÷ (×'×'ús   Á.BÂ
Bc           
      ó   • [         R                  " SS[         R                  " SSUS-  -  -   5      -   -  5      [         R                  -  n[         R                  " SSU-  -   5      [         R                  " U[         R                  " U* US-   -  5      -  5      -  nUS-  [         R                  " U5      -  n[         R
                  " US S5      $ )NrW   r   r  r1  )rQ   r&  r  rù  ÚimagrÉ  )rE   rv   rt  r.  rL	  s        r6   r{   Úrel_breitwigner_gen._cdf°0  s¥   € ä�GŠG�A�qœ2Ÿ7š7 1 q¨¨a©¡x¡<Ó0Ñ0Ñ1Ó2´2·5±5Ñ8ˆä�GŠG�B˜˜C™‘KÓ Ü�iŠi˜œ"Ÿ'š' 3 $¨¨b©¡/Ó2Ñ2Ó3ñ4ð 	ð �Q‘œŸš ›Ñ(ˆä�wŠw�v˜t QÓ'Ð'r8   c                 óf  • US:X  a  gUS:X  a†  [         R                  " SSSUS-  -  -   -  S[         R                  " SSUS-  -  -   5      -   -  5      [         R                  -  U-  nU[         R                  S-  [         R                  " U5      -   -  $ US:X  a‰  [         R                  " SSUS-  -  -   SS[         R                  " SSUS-  -  -   5      -   -  -  5      U-  nSUS-  -
  [         R                  " SSU-  -
  5      -  nSU-  [         R                  " U5      -  $ [         R
                  $ )Nr   r•   r   rW   r1  r  )rQ   r&  r  rù  r.  rm   )rE   re   rt  r.  rL	  s        r6   r+  Úrel_breitwigner_gen._munp»0  s  € Ø�‹6ØØ�‹6ä—’Ø�Q˜˜3 ™6™‘\Ñ" a¬"¯'ª'°!°a¸¸Q¹±h±,Ó*?Ñ&?Ñ@óä—‘ñàñˆAð œŸ™˜a™¤"§)¢)¨C£.Ñ0Ñ1Ð1Ø�‹6ä—’Ø�Q�s˜A‘v‘X‘ ! q¬2¯7ª7°1°q¸¸a¹±x±<Ó+@Ñ'@Ñ"AÑBóàñˆAð ˜# ™(‘l¤b§g¢g¨b°2°c±6©kÓ&:Ñ:ˆFØ�q‘5œ2Ÿ7š7 6›?Ñ*Ð*ä—6‘6ˆMr8   c                 óF   • S S [         R                  [         R                  4$ rO   r-  rs  s     r6   r   Úrel_breitwigner_gen._statsÎ0  s   € ð �Tœ2Ÿ6™6¤2§6¡6Ð)Ð)r8   c                 óÀ  >• [        XX#5      u  ppV[        U[        5      nU(       a"  UR                  5       S:X  a  UR                  nSnUb  U(       a  [
        TU ]  " U/UQ70 UD6$ Uc;  [        R                  " X-
  / SQ5      u  p‰n
X¨-
  nX›-  nU(       d  U/nSU;  a  X³S'   O&[        R                  " X-
  5      nXÖ-  nU(       d  U/n[
        TU ]  " U/UQ70 UD6$ )Nr   F)rÖ  r£   g      è?r/   )
rp  r?   r*   r@   rD   rA   rC   rQ   Úquantiler
  )rE   rF   rG   r5   r.  r  r  rH   r<  r=  r>  Úscale_0Úrho_0ÚM_0rÞ  s                 €r6   rC   Úrel_breitwigner_gen.fitÔ0  sí   ø€ ô !<Ø˜ó!
Ñˆ�ô ˜d¤LÓ1ˆÞØ× Ñ Ó" aÓ'ð ×'Ñ'�Ø �à‰<ž8Ü‘7’;˜tÐ3 dÒ3¨dÑ3Ð3à‰>ô ŸKšK¨©Ò5FÓG‰MˆC�cØ‘iˆGØ‘MˆEÞØ�w�Ø˜dÓ"Ø '�W‘øä—)’)˜D™KÓ(ˆCØ‘LˆEÞØ�w�Ü‰wŠ{˜4Ð/ $Ò/¨$Ñ/Ð/r8   r�   )rŽ   r�   r�   r‘   r’   rf   ro   rw   r{   r+  r   r   r   rC   r“   r-  r.  s   @r6   rq  rq  d0  sA   ø† ñ<òzòGò:ò	(òò&*ñ ˜MÓ*ô 0ó +ö 0r8   rq  Úrel_breitwignerrO   (N  r×  Úcollections.abcr   Ú	functoolsr   r   rJ  rP  ÚnumpyrQ   Únumpy.polynomialr   Úscipy.interpolater   Úscipy._lib.doccerr	   r
   r   Úscipy._lib._ccallbackr   Úscipyr   r   Úscipy.specialÚspecialr~   Úscipy.special._ufuncsr‹  rs   Úscipy._lib._utilr   Úscipy._lib.array_api_extraÚ_libÚarray_api_extrar#  Úscipy._lib._array_apir   r’  r   Ú_tukeylambda_statsr   r  r   r	  Ú_distn_infrastructurer   r   r   r   r   r   r   r   r   Ú_ksstatsr   r    r!   Ú
_constantsr"   r#   r$   r%   r&   r'   r(   r)   Ú_censored_datar*   Úscipy.optimizer+   Úscipy.stats._warnings_errorsr,   Úscipy.statsrT  r7   rL   r\   r^   r–   r›   r¶   r¹   rÎ   r&  r  rÓ   r  r×   rÕ   rØ   rÛ   rÞ   râ   rå   rè   rë   rí   r.  r0  rK  rM  rj  rl  r…  r!  r‡  rY   r�  r¡  r£  r­  r0  re  rg  r„  r†  rÐ  rÒ  rï  rñ  r  r  rA  rC  rz  r|  rJ  r£  rÃ  rÅ  rä  ræ  r"  r$  rH  rJ  rj  ro  r�  r‘  r“  rª  r¬  rÆ  rÈ  ræ  rè  r   r  r·  r/  rC  rE  r(  rw  r¤  Ú_supportr¦  r»  r½  rà  râ  r  r   r5  r7  r’  rŸ  r¡  r6  rÓ  rä  ræ  r  r  r%  r'  rx  rz  r�  r•  r—  rÀ  rÂ  rÞ  rà  rø  r  r4  r7  rQ  rW  rk  rm  rz  r|  r�  rŸ  rÆ  rÎ  r_  r;	  rf	  rh	  r€	  r‚	  rŸ	  r¡	  r´	  r¶	  rÍ	  rÏ	  rï	  rñ	  rõ	  r
  r'
  rp  r<
  rQ
  rS
  rc
  re
  ri
  r�
  r¿
  rÁ
  rØ
  rÞ
  rà
  r  r  r6  r8  rS  rU  ri  rk  rÂ  rÄ  rÚ  rÜ  rõ  r÷  r  r  r  rX  rZ  r{  r}  rÌ  r¸  rÕ  r×  rï  r  r  r  r>  r@  rX  r  r“  r•  r§  r©  r»  r½  rá  ræ  r  r  r  r  r  rK  rM  rb  rd  rv  rx  r‰  r‹  rÇ  rÉ  rñ  ró  r  r  r*  r/  rû  r@  rB  r‘  r“  rê  rô  r  r  r  rË  r)  r/  rY  rÇ  r¦  rv  r�  r’  r´  r¶  rÇ  rÉ  r  r  r  r  r   rC  rm   ro  rq  r‡  ÚlistÚglobalsrî  ÚitemsÚpairsÚ_distn_namesÚ_distn_gen_namesÚ__all__r�   r8   r6   Ú<module>r¨     s  ðó
 Ý $ß ,Û Û ã Ý 'Ý %÷7ñ 7õ 3Ý Ý Ý ç #Ð #Ý (ß (Ð (Ý ,å ÷B÷J÷ Jõ J÷ 2Ñ 1÷H÷ Hó Hå (Ý &Ý 1Ý ò7ò&õ*ô.W!�ô W!ñt 	�C˜3 WÑ-€ôZ)�ô Z)ñ| 	˜!˜s c°Ñ8€ô5�Mô 5ñp ˜C kÑ2€	ð �gŠg�a˜Ÿ™‘gÓ€Ø—’˜Ó$€ò+ò(òòòòòòômˆ}ô mñ` �VÑ€ô3'�ô 3'ñl 	�C˜gÑ&€ô(�ô (ñV 
�r—u‘u�f˜Q‘h "§%¡%¨¡'°Ñ	9€ô*'�-ô *'ñZ ˜˜s¨Ñ
3€ô

�:ô 

ô	�Xô 	òòôC
ˆ}ô C
ñL �#˜ 6Ñ*€ôl�Mô lñ^ ˜C kÑ2€	ô4#�=ô 4#ñn ˜# ¨:Ñ6€ôwEˆ}ô wEñt �#˜FÑ#€ôT2�ô T2ñn 
�c Ñ	)€ôOˆxô Oñd �#˜FÑ#€ôI"�ô I"ñX 
˜Ñ	"€ôNRˆmô NRñb �˜%Ñ €ôUDˆ}ô UDñp �#˜FÑ#€ô4#�ô 4#ñn 
�r—u‘u�f §¡¨HÑ	5€ôJ6�ô J6ñZ 
˜Ñ	"€ôD˜-ô DñN &¨Ð0AÑB€ôE�=ô EñP ˜ZÑ(€ôj(�ô j(ñZ 	�C˜gÑ&€ôK!�Mô K!ñ\ ˜{Ñ+€	ò&ô&E4�Mô E4ñP ˜C kÑ2€	ô23�=ô 23ñj ˜# JÑ/€ôJ�mô JñZ  ¨-Ñ8€ô-.�]ô -.ñ` ˜c¨Ñ5€
ôk@ˆMô k@ñ\ 
ˆC�cÑ€ô;�=ô ;ñ| ˜# JÑ/€ô^F�mô ^FñB  ¨-Ñ8€ôh!˜=ô h!ñV (Ð-?Ñ@Ð Ø&Ð Ô ôD4�mô D4ñN  ¨-Ñ8€ôR0�mô R0ñj  =Ñ1€ôr�Mô rñj ˜C kÑ2€	ô=;�=ô =;ñ@ ˜# JÑ/€ôh"�]ô h"ñV  Ñ.€
ò)ôdO�ô Oñd 	�C˜gÑ&€ô40�ô 40ñn 
�c Ñ	)€ô^F�=ô ^FñB ˜# JÑ/€ô/%˜-ô /%ñd &¨Ð2CÑD€ôb˜ô bñJ " Ñ7€ô->�=ô ->ñ` ˜# JÑ/€ò*ô~�=ô ~ñB ˜ZÑ(€ôK�=ô Kñ\ ˜ZÑ(€ôW�]ô Wñt ˜c¨Ñ5€
ô{�}ô {ñ|   #¨NÑ;€ôP�=ô Pñf ˜# JÑ/€ô+�Mô +ñ\ ˜{Ñ+€	ô5�]ô 5ñp ˜c S¨|Ñ<€
ôW�=ô Wñt ˜# JÑ/€ôT!�=ô T!ñn ˜# JÑ/€ôy�mô yñx	  ¨-Ñ8€ôP2�}ô P2ñf   ^Ñ4€ô@2�]ô @2ñF ˜a lÑ3€
ôa
�Mô a
ñH ˜{Ñ+€	ô56�Mô 56ñp ˜C 3¨[Ñ9€	ôZ�Mô Zñz ˜{Ñ+€	ôV�ô Vñr 
˜Ñ	"€ôE�-ô EñP ˜9Ñ
%€ô])˜]ô ])ñ@ ,Ð1EÑFÐ ò.*ôbb.ˆ}ô b.ñJ �#˜FÑ#€ôb.�ô b.ñJ 
�c Ñ	)€ôq7�=ô q7ñh ˜ZÑ(€ôr@�=ô r@ñj ˜ZÑ(€ô^�]ô ^ñ@ ˜c¨Ñ5€
òôC!�-ô C!ñL ˜ )Ñ
,€ô:-�ô :-ñz 
�c Ñ	)€ô>0�-ô >0ñB ˜ )Ñ
,€ô;P�ô ;Pñ| 
�c¡Ñ	)€öLI�ô LIñ^ 
™Ñ	"€öJI�ô JIñZ 
�c¡Ñ	)€öY$�ô Y$ñx 	‘wÑ€öa#�=ô a#ñH ˜#¡JÑ/€óö Z
ˆ}ô Z
ñz �#™FÑ#€ö]ˆmô ]ñ@ �™%Ñ €öoCˆMô oCñd 
‰s�O€öDˆmô DñN ‘5Ñ€ö[!�ô [!ñ| 
�c¡Ñ	)�ö6!�õ 6!òr 	�C™gÑ&�öAD�=õ ADòH ™ZÑ(�ö]4�=õ ]4ò@	 ˜# ©:Ñ6�ö40�}õ 40òn   #©NÑ;�ö31�Mõ 31òl ™{Ñ+�	ö:3�õ :3òz 	‘D˜C¡gÑ.�öv�=õ vòr ˜#¡JÑ/�öc?�]õ c?òT ¡Ñ.�
Ú¡Ñ.�
Ø �
Ô Ø �
Ô ö<&ˆ}õ <&ò~ �#™FÑ#�ö}&�Mõ }&ò@ ™{Ñ+�	Ù�	Ô ö39˜õ 39òl " C©oÑ>�ö9&�}õ 9&òx  ¡$¨#±NÑC�ö@'�]õ @'òF ¡Ñ.�
ö^F�=õ ^FòB ™ZÑ(�öm2�Mõ m2ò` ˜C 3©[Ñ9�	öF�õ FòR 
�c˜S¡xÑ	0�ö<4�]õ <4ò~ ˜c©Ñ5�
Ù �
Ô ô0ô
9ô%öPk.�Mõ k.ò\ ™{°AÒ6�	Ø�	Ô ö\�mõ \ò~
  ©-Ñ8�Ù!�Ô ö8.�mõ 8.òv ¡=Ñ1�ö
 Lõ 
öt(�-õ t(òn ˜˜s©Ñ
3�öo�=õ oòd ™ZÑ(�Ú §¡˜v¨¯©±_ÑE�ö:&ˆ|õ :&òz �#™FÑ#�öA$�]õ A$òF ˜c Q r§u¡u¡W±<Ñ@�
ö]�-õ ]ò@ ™9Ñ
%�ö=>�mõ =>ò@  ©Ñ6�öe6�mõ e6òP ¡=Ñ;SÒT�ô*öG)�õ G)òT 	‘wÑ)<ÀÀsÒK�ör�=õ röj@P˜Mõ @PòF *Ñ/BÀaØ,.¯FªFò4Ñ öQ0˜-õ Q0òh &¨Ñ2CÑD�ò 	ŠW‹Y�^Š^Ó×#Ò#Ó%Ó&�Ù!7¹¸}Ó!MÑ �Ñá
Ñ)Ñ
)©^Ð,<Ñ
<‚r8   