tanh method

Matrix tanh()

Element-wise tanh

Implementation

Matrix tanh() {
  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.tanh(this[i][j]);
    }
  }
  return result;
}