KEMBAR78
Allow dataset row indexing with np.int types (#7423) by DavidRConnell · Pull Request #7438 · huggingface/datasets · GitHub
Skip to content

Conversation

@DavidRConnell
Copy link
Contributor

@lhoestq
Proposed fix for #7423. Added a couple simple tests as requested. I had some test failures related to Java and pyspark even when installing with dev but these don't seem to be related to the changes here and fail for me even on clean main.

The typeerror raised when using the wrong type is: "Wrong key type: '{key}' of type '{type(key)}'. Expected one of int, slice, range, str or Iterable." I think that is fine. But I could modify the int part to something more generic (although I'm not sure what) if wanted.

@maxaugustyn
Copy link

+1

@DavidRConnell
Copy link
Contributor Author

@lhoestq can you take a look at this?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@lhoestq lhoestq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks !

@lhoestq lhoestq merged commit d9861d8 into huggingface:main Jul 23, 2025
10 of 14 checks passed
@DavidRConnell
Copy link
Contributor Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants