code: def logpdf(
      x: ArrayLike, loc: ArrayLike = 0, scale: ArrayLike = 1
  ) -> Array:
      x, loc, scale = promote_args_inexact(
          "expon.logpdf", x, loc, scale
      )
      log_scale = lax.log(scale)
      linear_term = lax.div(lax.sub(x, loc), scale)
      log_probs = lax.neg(lax.add(linear_term, log_scale))
      return jnp.where(lax.lt(x, loc), -jnp.inf, log_probs)
  
imports: import scipy.stats
  from jax import lax
  import jax.numpy
  from jax._src.numpy.util import _wraps, promote_args_inexact
  from jax._src.typing import Array, ArrayLike
label_desc: Use image node_id 1 for calling a global function with example usage: logpdf(x, loc, scale) and returns: jnp