parameters: (probs)
docstring: Used in categorical distribution. check Rank >=1.
docstring_summary: Used in categorical distribution. check Rank >=1.
docstring_tokens: Used in categorical distribution . check Rank > = 1 .
function: def check_rank(probs):
      """
      Used in categorical distribution. check Rank >=1.
      """
      if probs is None:
          raise ValueError(f'input value cannot be None in check_rank')
      if isinstance(probs, Parameter):
          if not isinstance(probs.data, Tensor):
              return
          probs = probs.data
      if probs.asnumpy().ndim == 0:
          raise ValueError(
              'probs for Categorical distribution must have rank >= 1.')
function_tokens: def check_rank ( probs ) : if probs is None : raise ValueError ( f'input value cannot be None in check_rank' ) if isinstance ( probs , Parameter ) : if not isinstance ( probs . data , Tensor ) : return probs = probs . data if probs . asnumpy ( ) . ndim == 0 : raise ValueError ( 'probs for Categorical distribution must have rank >= 1.' )