SciPy

scipy.sparse.dok_matrix.maximum

dok_matrix.maximum(other)[source]

Element-wise maximum between this and another matrix.