to_indices#
- BinaryGas.to_indices(mask)#
Converts a boolean mask to pore or throat indices
- Parameters:
mask (ndarray) – A boolean mask with True values indicating either pore or throat indices. This array must either be Nt or Np long, otherwise an Exception is raised.
- Returns:
indices – An array containing numerical indices of where mask was True.
- Return type:
ndarray
Notes
This function is equivalent to just calling np.where(mask)[0] but does check to ensure that mask is a valid length.