class_docstr: Peer Count of distinct categories in a given classifier.  This factor
  is returned by the classifier instance method peer_count()
  
  **Default Inputs:** None
  
  **Default Window Length:** 1
class_docstr_tok: ["Peer","Count","of","distinct","categories","in","a","given","classifier",".","This","factor","is","returned","by","the","classifier","instance","method","peer_count","(",")","*","*","Default","Inputs",":","*","*","None","*","*","Default","Window","Length",":","*","*","1"]
code: def compute(self, today, assets, out, classifier_values):
      # Convert classifier array to group label int array
      group_labels, null_label = self.inputs[0]._to_integral(
          classifier_values[0]
      )
      _, inverse, counts = unique(  # Get counts, idx of unique groups
          group_labels,
          return_counts=True,
          return_inverse=True,
      )
      copyto(out, counts[inverse], where=(group_labels != null_label))
  
imports: from numbers import Number
  from numpy import arange, average, clip, copyto, exp, fmax, full, isnan, log, NINF, sqrt, sum, unique
  from zipline.pipeline.data import EquityPricing
  from zipline.utils.input_validation import expect_types
  from zipline.utils.math_utils import nanargmax, nanmax, nanmean, nanstd, nansum
  from zipline.utils.numpy_utils import float64_dtype, ignore_nanwarnings
  from .factor import CustomFactor
  from ..mixins import SingleInputMixin
label_desc: Use image node_id 2 for calling the PeerCount obj's underlying member method code with example usage: obj.compute(today, assets, out, classifier_values) without return types