def weight_to_line(w):
    """
    - Takes weight vector w
    - Returns slope m and intercept b of line
    
    We know that w^T x = 0 for points (x1,x2) on the line, so
    w0 * 1 + w1 * x1 + w2 * x2 = 0
    w0     + w1 * x1 + w2 * x2 = 0
    
    Let's solve for x2:
        w2 * x2 = -w0 - w1*x1
    =>       x2 = -(w0/w2) + (-w1/w2) * x1
    
    This is the equation of a line x2 = b + m*x1.
    The intercept is b = -(w0/w2),
    the slope is m = -w1/w2
    
    Let's return both
    """
    b = -(w[0] / w[2])
    m = -(w[1] / w[2])
    
    return b, m