def gjrconvertparams(self, params, nar, nma):
 (p, q) = (nar, nma)
 ar = np.concatenate(([1], params[:p]))
 ma = np.zeros(((q + 1), 3))
 ma[(0, 0)] = params[(-1)]
 ma[:, 1] = np.concatenate(([0], params[p:(p + q)]))
 ma[:, 2] = np.concatenate(([0], params[(p + q):(p + (2 * q))]))
 mu = params[(-1)]
 params2 = (ar, ma)
 return paramsclass

def gjrconvertparams ( self , params , nar , nma ) : ( p , q ) = ( nar , nma ) ar = np . concatenate ( ( [ 1 ] , params [ : p ] ) ) ma = np . zeros ( ( ( q + 1 ) , 3 ) ) ma [ ( 0 , 0 ) ] = params [ ( - 1 ) ] ma [ : , 1 ] = np . concatenate ( ( [ 0 ] , params [ p : ( p + q ) ] ) ) ma [ : , 2 ] = np . concatenate ( ( [ 0 ] , params [ ( p + q ) : ( p + ( 2 * q ) ) ] ) ) mu = params [ ( - 1 ) ] params2 = ( ar , ma ) return paramsclass
flat to matrix notes needs to be overwritten by subclass .