def apply_inverse(self, y):
        """
        Apply the inverse of the covariance matrix to a vector or matrix

        Solve ``K.x = y`` for ``x`` where ``K`` is the covariance matrix of
        the GP with the white noise and ``yerr`` components included on the
        diagonal.

        Args:
            y (array[n] or array[n, nrhs]): The vector or matrix ``y``
            described above.

        Returns:
            array[n] or array[n, nrhs]: The solution to the linear system.
            This will have the same shape as ``y``.

        Raises:
            ValueError: For mismatched dimensions.

        """
        self._recompute()
        return self.solver.solve(self._process_input(y))
Apply the inverse of the covariance matrix to a vector or matrix

        Solve ``K.x = y`` for ``x`` where ``K`` is the covariance matrix of
        the GP with the white noise and ``yerr`` components included on the
        diagonal.

        Args:
            y (array[n] or array[n, nrhs]): The vector or matrix ``y``
            described above.

        Returns:
            array[n] or array[n, nrhs]: The solution to the linear system.
            This will have the same shape as ``y``.

        Raises:
            ValueError: For mismatched dimensions.