mypkgs.math#
Mathematical operations and linear algebra utilities.
Functions#
|
Multiply two matrices using matrix multiplication (dot product). |
Module Contents#
- mypkgs.math.multiply_matrices(matrix_a, matrix_b)[source]#
Multiply two matrices using matrix multiplication (dot product).
This function utilizes the
@operator for standard 2D matrix multiplication, which is equivalent to callingnumpy.matmul.- Parameters:
matrix_a (numpy.ndarray) – The first input matrix (2D array).
matrix_b (numpy.ndarray) – The second input matrix (2D array). The number of rows in matrix_b must strictly match the number of columns in matrix_a.
- Returns:
The resulting matrix from the multiplication.
- Return type:
- Raises:
ValueError – If the inner dimensions of the matrices do not align for multiplication.