I work on a program that deals with large networks and therefore I have to use sparse matrices (preferrably scipy.sparse.csr). Now I would like to write a function that takes two sparse boolean matrices A and B and returns B without those entries that are set in A. Here is a pseudo-code example.
def f(A, B):
return B and (not A)
How can this be done with scipy.sparse matrices?