abs method
Element-wise absolute value
Implementation
Matrix abs() {
Matrix result = Matrix.zeros(rowCount, columnCount, isDouble: true);
for (int i = 0; i < rowCount; i++) {
for (int j = 0; j < columnCount; j++) {
result[i][j] = (this[i][j] as num).abs();
}
}
return result;
}