Matrix Transpose
matrix_transposeSwap the rows and columns of a matrix to compute its transpose. Accepts a 2D list of numbers.
Instructions
Transpose a matrix (swap rows and columns).
Note: Requires NumPy. Raises ValueError if NumPy is unavailable.
Examples: matrix_transpose([[1, 2, 3], [4, 5, 6]]) matrix_transpose([[1], [2], [3]])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matrix | Yes | 2D list of numbers representing the matrix. Each inner list is a row. Example: [[1, 2, 3], [4, 5, 6]] |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| difficulty | Yes | ||
| original_cols | Yes | ||
| original_rows | Yes | ||
| result_matrix | Yes |