Ë
    ñukiê  ã            	       óŒ   — d dl 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 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y)é    N)Úlax)Únumpy)Ú_const)Úpromote_args_inexact)Úxlog1py)ÚArrayÚ	ArrayLikeÚkÚpÚlocÚreturnc                 ód  — t        d| ||«      \  } }}t        | d«      }t        | d«      }t        j                  | |«      }t	        t        j                  ||«      | «      t        j
                  |«      z   }t        j                  t        j                  ||«      t        j                   |«      S )aò  Geometric log probability mass function.

  JAX implementation of :obj:`scipy.stats.geom` ``logpmf``.

  The Geometric probability mass function is given by

  .. math::

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

  for :math:`k\ge 1` and :math:`0 \le p \le 1`.

  Args:
    k: arraylike, value at which to evaluate the PMF
    p: arraylike, distribution shape parameter
    loc: arraylike, distribution offset parameter

  Returns:
    array of logpmf values.

  See Also:
    :func:`jax.scipy.stats.geom.pmf`
  zgeom.logpmfr   é   )r   Ú
_lax_constr   Úsubr   ÚlogÚjnpÚwhereÚleÚnpÚinf)r
   r   r   ÚzeroÚoneÚxÚ	log_probss          úT/home/cdr/jupyterlab/.venv/lib/python3.12/site-packages/jax/_src/scipy/stats/geom.pyÚlogpmfr      s‰   € ô0 # =°!°Q¸Ó<)€!€QˆÜ	AqÓ	€$Ü1aÓ€#Ü	‡ggˆaƒo€!Ü”c—g‘g˜a “o¨ rÓ*¬S¯W©W°Q«ZÑ7€)Ü	‰”3—6‘6˜!˜T“?¤R§V¡V G¨YÓ	7Ð7ó    c                 óB   — t        j                  t        | ||«      «      S )aë  Geometric probability mass function.

  JAX implementation of :obj:`scipy.stats.geom` ``pmf``.

  The Geometric probability mass function is given by

  .. math::

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

  for :math:`k\ge 1` and :math:`0 \le p \le 1`.

  Args:
    k: arraylike, value at which to evaluate the PMF
    p: arraylike, distribution shape parameter
    loc: arraylike, distribution offset parameter

  Returns:
    array of pmf values.

  See Also:
    :func:`jax.scipy.stats.geom.logpmf`
  )r   Úexpr   )r
   r   r   s      r   Úpmfr!   9   s   € ô0 
‰”˜˜1˜cÓ"Ó	#Ð#r   )r   )r   r   Újax._srcr   r   Újax._src.lax.laxr   r   Újax._src.numpy.utilr   Újax._src.scipy.specialr   Újax._src.typingr   r	   r   r!   © r   r   ú<module>r(      s_   ðó å Ý !Ý 1Ý 4Ý *ß ,ñ8ˆið 8˜Ið 8¨Ið 8¸eó 8ñ@$ˆ9ð $˜ð $¨ð $¸5ô $r   