math4610

Routine Name: l2

Author: David Merkley

Language: Python

Description/Purpose: Gives the l2 norm

Input: a vector

Output: the norm

Implementation/Code:

def l2(x):
    return sqrt(sum([abs(xi)*abs(xi) for xi in x]))