Recall & Review
beginner
What does the transpose of a matrix do?
It flips the matrix over its diagonal, switching the row and column indices of each element.
Click to reveal answer
beginner
How do you transpose a matrix using NumPy?
Use the
.T attribute on a NumPy array, like matrix.T.Click to reveal answer
beginner
What is the shape of the transpose of a matrix with shape (3, 5)?
The transpose will have shape (5, 3), swapping rows and columns.
Click to reveal answer
beginner
True or False: Transposing a matrix twice returns the original matrix.
True. Transposing twice flips the matrix back to its original form.
Click to reveal answer
intermediate
How can you transpose a 3D NumPy array along specific axes?
Use
np.transpose(array, axes=(...)) to reorder axes as needed.Click to reveal answer
What does
matrix.T do in NumPy?✗ Incorrect
matrix.T flips the matrix over its diagonal, swapping rows and columns.
If a matrix has shape (4, 7), what is the shape of its transpose?
✗ Incorrect
Transposing swaps rows and columns, so (4, 7) becomes (7, 4).
Which NumPy function allows transposing with custom axis order?
✗ Incorrect
np.transpose() lets you specify axes order for transposing arrays.What happens if you transpose a matrix twice?
✗ Incorrect
Transposing twice returns the matrix to its original form.
Which of these is NOT true about matrix transpose?
✗ Incorrect
Transpose does not change element values, only their positions.
Explain how to transpose a 2D matrix in NumPy and describe what happens to its shape.
Think about flipping the matrix over its diagonal.
You got /3 concepts.
Describe how to transpose a 3D NumPy array along specific axes and why this might be useful.
Consider how axes represent dimensions in arrays.
You got /3 concepts.