Calculates the gradient for the log likelihood function using CSS
        Derivation:
            L(y | \theta) = -\frac{n}{2}log(2\pi\sigma^2) - \frac{1}{2\pi}\sum_{i=1}^n \epsilon_t^2 \\
            \sigma^2 = \frac{\sum_{i = 1}^n \epsilon_t^2}{n} \\
            \frac{\partial L}{\partial \theta} = -\frac{1}{\sigma^2}
            \sum_{i = 1}^n \epsilon_t \frac{\partial \epsilon_t}{\partial \theta} \\
            \frac{\partial \epsilon_t}{\partial \theta} = -\frac{\partial \hat{y}}{\partial \theta} \\
            \frac{\partial\hat{y}}{\partial c} = 1 +
            \phi_{t-q}^{t-1}*\frac{\partial \epsilon_{t-q}^{t-1}}{\partial c} \\
            \frac{\partial\hat{y}}{\partial \theta_{ar_i}} =  y_{t - i} +
            \phi_{t-q}^{t-1}*\frac{\partial \epsilon_{t-q}^{t-1}}{\partial \theta_{ar_i}} \\
            \frac{\partial\hat{y}}{\partial \theta_{ma_i}} =  \epsilon_{t - i} +
            \phi_{t-q}^{t-1}*\frac{\partial \epsilon_{t-q}^{t-1}}{\partial \theta_{ma_i}} \\
        
        Parameters
        ----------
        diffedY:
            array of differenced values
        
        returns the gradient log likelihood as an array of double

def gradient_log_likelihood_css_arma(self, diffedy):
        """
        Calculates the gradient for the log likelihood function using CSS
        Derivation:
            L(y | \theta) = -\frac{n}{2}log(2\pi\sigma^2) - \frac{1}{2\pi}\sum_{i=1}^n \epsilon_t^2 \\
            \sigma^2 = \frac{\sum_{i = 1}^n \epsilon_t^2}{n} \\
            \frac{\partial L}{\partial \theta} = -\frac{1}{\sigma^2}
            \sum_{i = 1}^n \epsilon_t \frac{\partial \epsilon_t}{\partial \theta} \\
            \frac{\partial \epsilon_t}{\partial \theta} = -\frac{\partial \hat{y}}{\partial \theta} \\
            \frac{\partial\hat{y}}{\partial c} = 1 +
            \phi_{t-q}^{t-1}*\frac{\partial \epsilon_{t-q}^{t-1}}{\partial c} \\
            \frac{\partial\hat{y}}{\partial \theta_{ar_i}} =  y_{t - i} +
            \phi_{t-q}^{t-1}*\frac{\partial \epsilon_{t-q}^{t-1}}{\partial \theta_{ar_i}} \\
            \frac{\partial\hat{y}}{\partial \theta_{ma_i}} =  \epsilon_{t - i} +
            \phi_{t-q}^{t-1}*\frac{\partial \epsilon_{t-q}^{t-1}}{\partial \theta_{ma_i}} \\
        
        Parameters
        ----------
        diffedY:
            array of differenced values
        
        returns the gradient log likelihood as an array of double
        """
        # need to copy diffedy to a double[] for Java
        result =  self._jmodel.gradientlogLikelihoodCSSARMA(_py2java_double_array(self._ctx, diffedy))
        return _java2py(self._ctx, result)