'Checks that the argument is a square matrix.'

def validate_arguments(self):

    (rows, cols) = self.args[0].size
    if (not (rows == cols)):
        raise ValueError('Argument    to    trace    must    be    a    square    matrix.')
