Skip to content

Commit

Permalink
Fix change of dtype of indices array in ValuationResult
Browse files Browse the repository at this point in the history
  • Loading branch information
schroedk committed Sep 6, 2024
1 parent a6a13e1 commit 4a53a2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pydvl/valuation/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def __init__(

if indices is None:
indices = np.arange(len(self._values), dtype=np.int_)
self._indices = np.array(indices, dtype=np.int_, copy=False)
self._indices = np.array(indices, dtype=indices.dtype, copy=False)
self._positions = {idx: pos for pos, idx in enumerate(indices)}

self._sort_positions: NDArray[np.int_] = np.arange(
Expand Down

0 comments on commit 4a53a2e

Please sign in to comment.