diff --git a/src/pydvl/valuation/samplers/powerset.py b/src/pydvl/valuation/samplers/powerset.py index 5aaa99d44..7bfe5deca 100644 --- a/src/pydvl/valuation/samplers/powerset.py +++ b/src/pydvl/valuation/samplers/powerset.py @@ -303,11 +303,10 @@ def __init__( def _generate(self, indices: IndexSetT) -> SampleGenerator: for idx in self.index_iterator(indices): - for subset in powerset( + for subset in powerset( # type:ignore complement(indices, [idx] if idx is not None else []) ): - typed_subset: Collection[IndexT] = subset - yield Sample(idx, np.asarray(typed_subset, dtype=indices.dtype)) + yield Sample(idx, np.asarray(subset, dtype=indices.dtype)) def sample_limit(self, indices: IndexSetT) -> int | None: len_outer = self._index_iteration.length(indices)