scipy.sparse.dia_matrix.

tanh#

dia_matrix.tanh()[source]#

Element-wise tanh. See numpy.tanh for more information.

Returns:
tanhsparse array / matrix

Result of applying numpy.tanh to the data of this sparse matrix.