def _format_samples(
        self, samples: np.ndarray, labels: Optional[np.ndarray] = None
    ) -> tuple[Any, Any]:
        """
        CatBoost currently only supports categorical features as int.
        If categorical features are specified, the samples are converted into a pandas DataFrame and categorical
        columns are cast to integer.
        """
        samples, labels = super()._format_samples(samples, labels=labels)
        if len(self._categorical_indices) != 0:
            # transform into pandas df and cast categorical columns to int
            samples = pd.DataFrame(samples)
            samples = samples.astype({col: int for col in self._categorical_indices})
        return samples, labels

        CatBoost currently only supports categorical features as int.
        If categorical features are specified, the samples are converted into a pandas DataFrame and categorical
        columns are cast to integer.
        
darts/models/forecasting/catboost_model.py