'Checks that the dimensions of x and P match.'

def validate_arguments(self):

    X = self.args[0]
    P = self.args[1]
    if (P.size[0] != P.size[1]):
        raise ValueError('The    second    argument    to    matrix_frac    must    be    a    square    matrix.')
    elif (X.size[0] != P.size[0]):
        raise ValueError('The    arguments    to    matrix_frac    have    incompatible    dimensions.')
