MATMUL
Download Flojoy Studio to try this app
Take two input matrices, multiply them, and return the result. Params: a : Matrix The matrix on the left of the multiplication. b : Matrix The matrix on the right of the multiplication. Returns: out : Matrix The matrix result from the matrix multiplication.
Python Code
import numpy as np
from flojoy import flojoy, Matrix
@flojoy
def MATMUL(a: Matrix, b: Matrix) -> Matrix:
"""Take two input matrices, multiply them, and return the result.
Parameters
----------
a : Matrix
The matrix on the left of the multiplication.
b : Matrix
The matrix on the right of the multiplication.
Returns
-------
Matrix
The matrix result from the matrix multiplication.
"""
return Matrix(m=np.matmul(a.m, b.m))
Example App
Having problems with this example app? Join our Discord community and we will help you out!
In this example, we generate two matrix by using MATRIX
nodes. Then, these are multiplied using MATMUL
node.