def gradient(self, ts):
        """
        Find the gradient of the log likelihood with respect to the given time series.
        
        Based on http://www.unc.edu/~jbhill/Bollerslev_GARCH_1986.pdf
        
        Returns an 3-element array containing the gradient for the alpha, beta, and omega parameters.
        """
        gradient = self._jmodel.gradient(_py2java(self._ctx, Vectors.dense(ts)))
        return _java2py(self._ctx, gradient)
Find the gradient of the log likelihood with respect to the given time series.
        
        Based on http://www.unc.edu/~jbhill/Bollerslev_GARCH_1986.pdf
        
        Returns an 3-element array containing the gradient for the alpha, beta, and omega parameters.