
    Vpf              	           d dl mZmZ d dlmZ d dlmZ d dlm	Z
 d dlmZ d dlmZmZ dded	ed
edefdZdded	ed
edefdZdded	ed
edefdZdded	ed
edefdZdded	ed
edefdZdded	ed
edefdZdS )    )expitlogit)laxN)_const)promote_args_inexact)Array	ArrayLike   xlocscalereturnc                    t          d| ||          \  } }}t          j        t          j        | |          |          } t	          | d          }t          j        | |          }t          j        t          j        t          j        |          t          j        |t          j        |                              t          j	        |                    S )a  Logistic log probability distribution function.

  JAX implementation of :obj:`scipy.stats.logistic` ``logpdf``.

  The logistic probability distribution function is given by

  .. math::

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

  Args:
    x: arraylike, value at which to evaluate the PDF
    a: arraylike, distribution shape parameter
    loc: arraylike, distribution offset parameter
    scale: arraylike, distribution scale parameter

  Returns:
    array of logpdf values.

  See Also:
    - :func:`jax.scipy.stats.logistic.cdf`
    - :func:`jax.scipy.stats.logistic.pdf`
    - :func:`jax.scipy.stats.logistic.sf`
    - :func:`jax.scipy.stats.logistic.isf`
    - :func:`jax.scipy.stats.logistic.ppf`
  zlogistic.logpdf   )
r   r   divsub
_lax_constmulnegjnp	logaddexplog)r   r   r   twohalf_xs        ]/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/jax/_src/scipy/stats/logistic.pylogpdfr      s    6 ''8!S%HH-!S%	gcgaoou%%!1a#71c??&	s}VSWV__'M'MNNPSPWX]P^P^	_	__    c                 H    t          j        t          | ||                    S )a  Logistic probability distribution function.

  JAX implementation of :obj:`scipy.stats.logistic` ``pdf``.

  The logistic probability distribution function is given by

  .. math::

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

  Args:
    x: arraylike, value at which to evaluate the PDF
    loc: arraylike, distribution offset parameter
    scale: arraylike, distribution scale parameter

  Returns:
    array of pdf values.

  See Also:
    - :func:`jax.scipy.stats.logistic.cdf`
    - :func:`jax.scipy.stats.logistic.sf`
    - :func:`jax.scipy.stats.logistic.isf`
    - :func:`jax.scipy.stats.logistic.logpdf`
    - :func:`jax.scipy.stats.logistic.ppf`
  )r   expr   r   r   r   s      r   pdfr!   :   s     4 
3&&	'	''r   c                     t          d| ||          \  } }}t          j        t          j        t	          |           |          |          S )a  Logistic distribution percent point function.

  JAX implementation of :obj:`scipy.stats.logistic` ``ppf``.

  The percent point function is defined as the inverse of the
  cumulative distribution function, :func:`jax.scipy.stats.logistic.cdf`.

  Args:
    x: arraylike, value at which to evaluate the PPF
    loc: arraylike, distribution offset parameter
    scale: arraylike, distribution scale parameter

  Returns:
    array of ppf values.

  See Also:
    - :func:`jax.scipy.stats.logistic.cdf`
    - :func:`jax.scipy.stats.logistic.pdf`
    - :func:`jax.scipy.stats.logistic.sf`
    - :func:`jax.scipy.stats.logistic.isf`
    - :func:`jax.scipy.stats.logistic.logpdf`
  zlogistic.ppf)r   r   addr   r   r    s      r   ppfr$   W   sA    . '~q#uEE-!S%	q5))3	/	//r   c           
          t          d| ||          \  } }}t          t          j        t          j        t          j        | |          |                              S )a  Logistic distribution survival function.

  JAX implementation of :obj:`scipy.stats.logistic` ``sf``

  The survival function is defined as

  .. math::

     f_{sf}(x, k) = 1 - f_{cdf}(x, k)

  where :math:`f_{cdf}(x, k)` is the cumulative distribution function,
  :func:`jax.scipy.stats.logistic.cdf`.

  Args:
    x: arraylike, value at which to evaluate the SF
    loc: arraylike, distribution offset parameter
    scale: arraylike, distribution scale parameter

  Returns:
    array of sf values.

  See Also:
    - :func:`jax.scipy.stats.logistic.cdf`
    - :func:`jax.scipy.stats.logistic.pdf`
    - :func:`jax.scipy.stats.logistic.isf`
    - :func:`jax.scipy.stats.logistic.logpdf`
    - :func:`jax.scipy.stats.logistic.ppf`
  zlogistic.sf)r   r   r   r   r   r   r    s      r   sfr&   r   sK    : '}aeDD-!S%	swswswq#6677	8	88r   c           	          t          d| ||          \  } }}t          j        t          j        t          j        t          |                     |          |          S )aw  Logistic distribution inverse survival function.

  JAX implementation of :obj:`scipy.stats.logistic` ``isf``.

  Returns the inverse of the survival function,
  :func:`jax.scipy.stats.logistic.sf`.

  Args:
    x: arraylike, value at which to evaluate the ISF
    loc: arraylike, distribution offset parameter
    scale: arraylike, distribution scale parameter

  Returns:
    array of isf values.

  See Also:
    - :func:`jax.scipy.stats.logistic.cdf`
    - :func:`jax.scipy.stats.logistic.pdf`
    - :func:`jax.scipy.stats.logistic.sf`
    - :func:`jax.scipy.stats.logistic.logpdf`
    - :func:`jax.scipy.stats.logistic.ppf`
  zlogistic.isf)r   r   r#   r   r   r   r    s      r   isfr(      sK    . '~q#uEE-!S%	q**E22C	8	88r   c                     t          d| ||          \  } }}t          t          j        t          j        | |          |                    S )a  Logistic cumulative distribution function.

  JAX implementation of :obj:`scipy.stats.logistic` ``cdf``.

  The cdf is defined as

  .. math::

     f_{cdf}(x, k) = \int_{-\infty}^x f_{pdf}(y, k)\mathrm{d}y

  where :math:`f_{pdf}` is the probability density function,
  :func:`jax.scipy.stats.logistic.pdf`.

  Args:
    x: arraylike, value at which to evaluate the CDF
    loc: arraylike, distribution offset parameter
    scale: arraylike, distribution scale parameter

  Returns:
    array of cdf values.

  See Also:
    - :func:`jax.scipy.stats.logistic.pdf`
    - :func:`jax.scipy.stats.logistic.sf`
    - :func:`jax.scipy.stats.logistic.isf`
    - :func:`jax.scipy.stats.logistic.logpdf`
    - :func:`jax.scipy.stats.logistic.ppf`
  zlogistic.cdf)r   r   r   r   r   r    s      r   cdfr*      sA    : '~q#uEE-!S%	swswq#..	/	//r   )r   r
   )jax.scipy.specialr   r   jaxr   	jax.numpynumpyr   jax._src.lax.laxr   r   jax._src.numpy.utilr   jax._src.typingr   r	   r   r!   r$   r&   r(   r*    r   r   <module>r3      s   + * * * * * * *             1 1 1 1 1 1 4 4 4 4 4 4 , , , , , , , ,` `i `i `I `e ` ` ` `D( (9 (9 ( (5 ( ( ( (:0 09 09 0 05 0 0 0 069 9) 9) 9	 9% 9 9 9 9B9 99 99 9 95 9 9 9 960 09 09 0 05 0 0 0 0 0 0r   