Skip to content

Commit

Permalink
Add additional variable to pass mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
schroedk committed Sep 2, 2024
1 parent 784a40e commit b236c86
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pydvl/valuation/samplers/powerset.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,8 @@ def _generate(self, indices: IndexSetT) -> SampleGenerator:
for subset in powerset(
complement(indices, [idx] if idx is not None else [])
):
yield Sample(
idx,
np.asarray(cast(Collection[IndexT], subset), dtype=indices.dtype),
)
typed_subset: Collection[IndexT] = subset
yield Sample(idx, np.asarray(typed_subset, dtype=indices.dtype))

def sample_limit(self, indices: IndexSetT) -> int | None:
len_outer = self._index_iteration.length(indices)
Expand Down

0 comments on commit b236c86

Please sign in to comment.