SciPy

scipy.sparse.lil_matrix.maximum

lil_matrix.maximum(other)[source]

Element-wise maximum between this and another matrix.