skoot.utils
.safe_mask_samples¶
-
skoot.utils.
safe_mask_samples
(X, mask)[source][source]¶ Select samples (rows) from a matrix from a mask.
Select observations from a np.ndarray or pd.DataFrame by using a mask. This creates a copy of X, and allows us to use
iloc
with a mask even though not natively supported by Pandas.Parameters: X : array-like, shape=(n_samples, n_features)
The array from which to drop records.
mask : array-like, shape=(n_samples,)
The boolean mask.