'Generates boolean masks corresponding to test sets.
By default, delegates to _iter_test_indices(X, y, groups)'

def _iter_test_masks(self, X=None, y=None, groups=None):

    for test_index in self._iter_test_indices(X, y, groups):
        test_mask = np.zeros(_num_samples(X), dtype=np.bool)
        test_mask[test_index] = True
        (yield test_mask)
