def _check_param_dims(params):
    """
    `params` are either `ar` or `ma`
    """
    if len(params.shape) != 3:
        raise ValueError('AR and MA should each be 1 or 3-dimensional.',
            params.shape)
    if params.shape[1] != params.shape[2]:
        raise ValueError(
            'Dimensions 1 and 2 of AR coefficients should be equal.  i.e. K x N x N'
            , params.shape)
