Partition a matrix into irreducible block diagonal form
This is equivalent to identifying the connected components of the bipartite incidence graph of rows and columns.
matrix (scipy.sparse.coo_matrix) – Matrix to partition into block diagonal form
scipy.sparse.coo_matrix
row_blocks (list of lists) – Partition of row coordinates into diagonal blocks
col_blocks (list of lists) – Partition of column coordinates into diagonal blocks