def predict_uncertainty(self, x: np.ndarray) -> np.ndarray:
        """
        Perform uncertainty prediction for a batch of inputs.

        :param x: Input samples.
        :return: Array of uncertainty predictions of shape `(nb_inputs)`.
        """
        # Apply preprocessing
        x_preprocessed, _ = self._apply_preprocessing(x, y=None, fit=False)

        # Perform prediction
        out = self.model.predict_noiseless(x_preprocessed)[1]

        # Apply postprocessing
        predictions = self._apply_postprocessing(preds=out, fit=False)

        return predictions

        Perform uncertainty prediction for a batch of inputs.

        :param x: Input samples.
        :return: Array of uncertainty predictions of shape `(nb_inputs)`.
        
art/estimators/classification/GPy.py