def getScalars(self, input):
if input == SENTINEL_VALUE_FOR_MISSING_DATA:<EOL><INDENT>return numpy.array([<NUM_LIT:0>])<EOL><DEDENT>index = self.categoryToIndex.get(input, None)<EOL>if index is None:<EOL><INDENT>if self._learningEnabled:<EOL><INDENT>self._addCategory(input)<EOL>index = self.ncategories - <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>index = <NUM_LIT:0><EOL><DEDENT><DEDENT>return numpy.array([index])<EOL>
See method description in base.py