import math


def eucl_norm(d1):
    """
    DESCRIPTION: Compute the Euclidean norm of a sparse vector  
    INPUT: d1 <dictionary> - sparse vector representation
    OUTPUT: Norm of the sparse vector d1
    """
    norm = 0.0
    for val in d1.values():
        norm += float(val * val)
    return math.sqrt(norm)