to_indices¶
- GenericTransportMetrics.to_indices(mask)¶
Converts a boolean mask to a list of pore or throat indices.
- Parameters
mask (array_like of booleans) – A boolean array with
True
at locations where indices are desired. The appropriate indices are returned based an the length of mask, which must be either Np or Nt long.- Returns
A list of pore or throat indices corresponding the locations where the received mask was
True
.- Return type
ndarray
See also
Notes
This behavior could just as easily be accomplished by using the mask in
pn.pores()[mask]
orpn.throats()[mask]
. This method is just a convenience function and is a complement toto_mask
.