class_docstr: Create a negative binomial distribution object.
  
  Parameters
  ----------
  n : Tensor or scalar
      Non-negative number of negative Bernoulli trials to stop.
  prob : Tensor or scalar, default None
      Probability of sampling `1`.
  logit : Tensor or scalar, default None
      The log-odds of sampling `1`.
class_docstr_tok: ["Create","a","negative","binomial","distribution","object",".","Parameters","--","--","--","--","--","n",":","Tensor","or","scalar","Non-negative","number","of","negative","Bernoulli","trials","to","stop",".","prob",":","Tensor","or","scalar",",","default","None","Probability","of","sampling","`","1","`",".","logit",":","Tensor","or","scalar",",","default","None","The","log-odds","of","sampling","`","1","`","."]
code: def __init__(self, n, prob=None, logit=None, validate_args=None):
      if (prob is None) == (logit is None):
          raise ValueError(
              "Either `prob` or `logit` must be specified, but not both. "
              + "Received prob={}, logit={}".format(prob, logit)
          )
  
      if prob is not None:
          self.prob = prob
      else:
          self.logit = logit
      self.n = n
      super(NegativeBinomial, self).__init__(
          event_dim=0, validate_args=validate_args
      )
  
file_path: mxnet/python/mxnet/gluon/probability/distributions/negative_binomial.py
imports: from .distribution import Distribution
  from .poisson import Poisson
  from .gamma import Gamma
  from .utils import prob2logit, logit2prob, cached_property
  from .utils import gammaln
  from .constraint import GreaterThanEq, Interval, Real, NonNegativeInteger
  from ....None import np
label_desc: Use image node_id 1 to create a new NegativeBinomial object from inherited base classes: Distribution with example: obj = NegativeBinomial(n, prob, logit, validate_args)