src/nupic/encoders/sdr_category.py
def getBucketInfo(self, buckets):
    """ See the function description in base.py
    """

    if self.ncategories==0:
      return 0

    topDownMappingM = self._getTopDownMapping()

    categoryIndex = buckets[0]
    category = self.categories[categoryIndex]
    encoding = topDownMappingM.getRow(categoryIndex)

    return [EncoderResult(value=category, scalar=categoryIndex,
                          encoding=encoding)]
def getBucketInfo(self, buckets):
    """ See the function description in base.py
    """

    if self.ncategories==0:
      return 0

    topDownMappingM = self._getTopDownMapping()

    categoryIndex = buckets[0]
    category = self.categories[categoryIndex]
    encoding = topDownMappingM.getRow(categoryIndex)

    return [EncoderResult(value=category, scalar=categoryIndex,
                          encoding=encoding)]
def getBucketInfo ( self , buckets ) : if self . ncategories == 0 : return 0 topDownMappingM = self . _getTopDownMapping ( ) categoryIndex = buckets [ 0 ] category = self . categories [ categoryIndex ] encoding = topDownMappingM . getRow ( categoryIndex ) return [ EncoderResult ( value = category , scalar = categoryIndex , encoding = encoding ) ]
See the function description in base.py
See the function description in base . py