Skip to content

Commit

Permalink
feat: handle slice based access in get_column_values
Browse files Browse the repository at this point in the history
  • Loading branch information
neindochoh committed Sep 21, 2023
1 parent ec12d45 commit 50488f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renumics/spotlight_plugins/core/huggingface_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def get_column_values(
if indices == slice(None):
raw_values = self._dataset.data[column_name]
else:
# TODO: handle slices
assert False
actual_indices = list(range(len(self._dataset)))[indices]
raw_values = self._dataset.data[column_name].take[actual_indices]
else:
raw_values = self._dataset.data[column_name].take(indices)

Expand Down

0 comments on commit 50488f9

Please sign in to comment.