SciPy

scipy.sparse.dia_matrix.maximum

dia_matrix.maximum(other)[source]