def marginal_loglike(self, x):
        """Marginal log-likelihood.

        Returns ``L_marg(x) = \int L(x,y|z') L(y) dy``

        This will used the cached '~fermipy.castro.Interpolator' 
        object if possible, and construct it if needed.
        """
        if self._marg_interp is None:
            # This calculates values and caches the spline
            return self._marginal_loglike(x)

        x = np.array(x, ndmin=1)
        return self._marg_interp(x)