SciPy

scipy.sparse.dia_matrix.tanh

dia_matrix.tanh()[source]

Element-wise tanh.

See numpy.tanh for more information.