openpnm.topotools.find_complement(am, sites=None, bonds=None, asmask=False)[source]

Finds the complementary sites (or bonds) to a given set of inputs

  • am (scipy.sparse matrix) – The adjacency matrix of the network.

  • sites (array_like (optional)) – The set of sites for which the complement is sought

  • bonds (array_like (optional)) – The set of bonds for which the complement is sought

  • asmask (bool) – If set to True the result is returned as a boolean mask of the correct length with True values indicate the complements. The default is False which returns a list of indices instead.


  • An array containing indices of the sites (or bonds) that are not part of

  • the input list.


Either sites or bonds must be specified