simpeg.utils.validate_active_indices#

simpeg.utils.validate_active_indices(property_name, index_arr, n_cells)[source]#

Validates an array intended to indicate a list of active indices.

This accepts either an array of booleans, or an array of active integers.

Parameters:
property_namestr

The name of the property

index_arrarray_like

The active index array to validate

n_cellsint

The length of the expected array

Returns:
(n_cells) numpy.ndarray of bool