tanh scipy.sparse.coo_matrix. coo_matrix.tanh() Element-wise tanh. See numpy.tanh for more information. Returns: tanh : sparse array / matrixResult of applying to the data of this sparse matrix.