TRANSPOSE_MATRIX
Take an input 2D matrix and transpose it.Params:a : MatrixThe input matrix to be transposedReturns:out : MatrixThe transposed matrix
 
Python Code
from numpy import transpose
from flojoy import flojoy, Matrix
@flojoy
def TRANSPOSE_MATRIX(default: Matrix) -> Matrix:
    """Take an input 2D matrix and transpose it.
    Parameters
    ----------
    a : Matrix
        The input matrix to be transposed
    Returns
    -------
    Matrix
        The transposed matrix
    """
    return Matrix(m=transpose(default.m, (1, 0)))
Example
Having problems with this example app? Join our Discord community and we will help you out!
This example shows the function of the TRANSPOSE_MATRIX node. This node transposes the input matrix by switching columns to rows and visa versa.