WEEK 3 -Programming assignment

I think my soultion is correct bu the test case fails for the following
Please let me know the mistake in my code

def T_rotation_and_stretch(theta, a, v):
    """
    Performs a combined 2D rotation and stretching transformation on an array v using a rotation angle theta and a stretching factor a.

    Args:
        theta (float): The rotation angle in radians.
        a (float): The stretching factor.
        v (np.array): The array to be transformed.

    Returns:
        np.array: The transformed array.
    """
    ### START CODE HERE ###

    # mentor edit: code removed

    ### END CODE HERE ###

    return w

Please do not post your code on the forum. That’s not allowed by the Code of Conduct.

I’ll edit your reply to remove the code.

Stand by for a more detailed reply later.

Try applying the function as you wrote it to some examples. What happens? Does it do what you want?

Hint: the rotation portion of the transformation will probably work, but I predict that the stretching will not. :nerd_face:

Actually this is just combining two functions you’ve already written, right? Look at the matrix you used for the stretching. Does it agree with how you wrote it in the previous “stretch” function?