mvpa2.featsel.base.mask2slice

mvpa2.featsel.base.mask2slice(mask)

Convert a boolean mask vector into an equivalent slice (if possible).

Parameters:

mask: boolean array

The mask.

Returns:

slice or boolean array

If possible the boolean mask is converted into a slice. If this is not possible the unmodified boolean mask is returned.