Expand description
Element-wise operations for matrices and scalars
This module implements language-compatible element-wise operations (.*, ./, .^) These operations work element-by-element on matrices and support scalar broadcasting.
Functionsยง
- elementwise_
add - Element-wise addition: A + B Supports matrix-matrix, matrix-scalar, and scalar-matrix operations
- elementwise_
div - Element-wise division: A ./ B Supports matrix-matrix, matrix-scalar, and scalar-matrix operations
- elementwise_
mul - Element-wise multiplication: A .* B Supports matrix-matrix, matrix-scalar, and scalar-matrix operations
- elementwise_
neg - Element-wise negation: -A Supports scalars and matrices
- elementwise_
pow - Element-wise power: A .^ B Supports matrix-matrix, matrix-scalar, and scalar-matrix operations
- elementwise_
sub - Element-wise subtraction: A - B Supports matrix-matrix, matrix-scalar, and scalar-matrix operations
- power
- Regular power operation: A ^ B
For matrices, this is matrix exponentiation (A^n where n is integer) For scalars, this is regular exponentiation