logn method

Matrix logn(
  1. num base
)

Element-wise logarithm for any base

Implementation

Matrix logn(num base) {
  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] = math.log(this[i][j]) / math.log(base);
    }
  }
  return result;
}