find_complement¶
- openpnm.topotools.find_complement(am, sites=None, bonds=None, asmask=False)[source]¶
Finds the complementary sites (or bonds) to a given set of inputs
- Parameters
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 withTrue
values indicate the complements. The default isFalse
which returns a list of indices instead.
- Returns
An array containing indices of the sites (or bonds) that are not part of
the input list.
Notes
Either
sites
orbonds
must be specified