def remapCategories(self, mapping):
categoryArray = numpy.array(self._categoryList)<EOL>newCategoryArray = numpy.zeros(categoryArray.shape[<NUM_LIT:0>])<EOL>newCategoryArray.fill(-<NUM_LIT:1>)<EOL>for i in range(len(mapping)):<EOL><INDENT>newCategoryArray[categoryArray==i] = mapping[i]<EOL><DEDENT>self._categoryList = list(newCategoryArray)<EOL>
Change the category indices.

        Used by the Network Builder to keep the category indices in sync with the
        ImageSensor categoryInfo when the user renames or removes categories.

        :param mapping: List of new category indices. For example, mapping=[2,0,1]
            would change all vectors of category 0 to be category 2, category 1 to
            0, and category 2 to 1