import math


def mag_of(vals):
        """
        Returns the magnitude of a list of vals 
        by taking the square root of the sum of the square of the components.
        """

        assert(type(vals) is list)
        return math.sqrt(sum([x*x for x in vals]))