<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def transform(v1, v2):
 """ Create an affine transformation matrix that maps vector 1 onto vector 2 https://math.stackexchange.com/questions/293116/rotating-one-3d-vector-to-another """

    theta = angle(v1,v2)
    x = N.cross(v1,v2)
    x = x / N.linalg.norm(x)

    A = N.array([
        [0, -x[2], x[1]],
        [x[2], 0, -x[0]],
        [-x[1], x[0], 0]])
    R = N.exp(A*theta)

    return R