class_docstr: Categorical Distribution 
class_docstr_tok: ["Categorical","Distribution"]
docstr: Returns log probability of category 
code: def logp(self, value):
      """Returns log probability of category"""
      if hasattr(value, "__len__"):
          if len(value) == 1:
              value = np.asscalar(value)
          else:
              raise ValueError("Input dimension should be 1.")
  
      if value < 0 or value >= self.k:
          return -np.inf
      return np.log(self.p[value])
  
imports: from __future__ import absolute_import
  import numpy
  from .distribution import Discrete
  from ..exd import domains
label_desc: Use image node_id 6 for calling the Categorical obj's underlying member method code with example usage: obj.logp(value) and returns: np, unknown