class_docstr: Exponential distribution.
  
  The Exponential distribution is parameterized by an event `rate` parameter.
  
  #### Mathematical Details
  
  The probability density function (pdf) is,
  
  ```none
  pdf(x; lambda, x > 0) = exp(-lambda x) / Z
  Z = 1 / lambda
  ```
  
  where `rate = lambda` and `Z` is the normalizaing constant.
  
  The Exponential distribution is a special case of the Gamma distribution,
  i.e.,
  
  ```python
  Exponential(rate) = Gamma(concentration=1., rate)
  ```
  
  The Exponential distribution uses a `rate` parameter, or "inverse scale",
  which can be intuited as,
  
  ```none
  X ~ Exponential(rate=1)
  Y = X / rate
  ```
class_docstr_tok: ["Exponential","distribution",".","The","Exponential","distribution","is","parameterized","by","an","event","`","rate","`","parameter",".","#","#","#","#","Mathematical","Details","The","probability","density","function","(","pdf",")","is",",","``","`","none","pdf","(","x",";","lambda",",","x",">","0",")","=","exp","(","-lambda","x",")","\/","Z","Z","=","1","\/","lambda","``","`","where","`","rate","=","lambda","`","and","`","Z","`","is","the","normalizaing","constant",".","The","Exponential","distribution","is","a","special","case","of","the","Gamma","distribution",",","i.e.",",","``","`","python","Exponential","(","rate",")","=","Gamma","(","concentration=1.",",","rate",")","``","`","The","Exponential","distribution","uses","a","`","rate","`","parameter",",","or","``","inverse","scale","''",",","which","can","be","intuited","as",",","``","`","none","X","~","Exponential","(","rate=1",")","Y","=","X","\/","rate","``","`"]
code: def _sample_n(self, n, seed=None):
      rate = tf.convert_to_tensor(self.rate)
      shape = ps.concat([[n], ps.shape(rate)], 0)
      # Uniform variates must be sampled from the open-interval `(0, 1)` rather
      # than `[0, 1)`. To do so, we use
      # `np.finfo(dtype_util.as_numpy_dtype(self.dtype)).tiny`
      # because it is the smallest, positive, "normal" number. A "normal" number
      # is such that the mantissa has an implicit leading 1. Normal, positive
      # numbers x, y have the reasonable property that, `x + y >= max(x, y)`. In
      # this case, a subnormal number (i.e., np.nextafter) can cause us to sample
      # 0.
      sampled = samplers.uniform(
          shape,
          minval=np.finfo(dtype_util.as_numpy_dtype(self.dtype)).tiny,
          maxval=1.0,
          seed=seed,
          dtype=self.dtype,
      )
      return -tf.math.log(sampled) / rate
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 6 for calling the Exponential obj's underlying member method code with example usage: obj._sample_n(n, seed) and returns: unknown