`self._categorical_data = np.asarray(categorical_data)` will save a few lines