sklearn.utils.safe_mask

sklearn.utils.safe_mask(X, mask)

Return a mask which is safe to use on X.

Parameters:

X : {array-like, sparse matrix}

Data on which to apply mask.

mask : array

Mask to be used on X.

Returns:

mask