Allow dataset row indexing with np.int types (#7423)
NONE
+1
2025-07-15T14:34:05Z
https://github.com/huggingface/datasets/pull/7438#issuecomment-3073876808
https://api.github.com/repos/huggingface/datasets/issues/7438
IC_kwDODunzps63N6NI
https://api.github.com/repos/huggingface/datasets/issues/comments/3073876808/reactions
2025-07-15T14:34:05Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3073876808
https://avatars.githubusercontent.com/u/1206279?v=4
https://api.github.com/users/maxaugustyn/events{/privacy}
https://api.github.com/users/maxaugustyn/followers
https://api.github.com/users/maxaugustyn/following{/other_user}
https://api.github.com/users/maxaugustyn/gists{/gist_id}
https://github.com/maxaugustyn
maxaugustyn
MDQ6VXNlcjEyMDYyNzk=
https://api.github.com/users/maxaugustyn/orgs
https://api.github.com/users/maxaugustyn/received_events
https://api.github.com/users/maxaugustyn/repos
https://api.github.com/users/maxaugustyn/starred{/owner}{/repo}
https://api.github.com/users/maxaugustyn/subscriptions
User
https://api.github.com/users/maxaugustyn
public
CONTRIBUTOR
@lhoestq can you take a look at this?
2025-07-23T04:05:48Z
https://github.com/huggingface/datasets/pull/7438#issuecomment-3105603578
https://api.github.com/repos/huggingface/datasets/issues/7438
IC_kwDODunzps65G7_6
https://api.github.com/repos/huggingface/datasets/issues/comments/3105603578/reactions
2025-07-23T04:05:48Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3105603578
https://avatars.githubusercontent.com/u/35470740?v=4
https://api.github.com/users/DavidRConnell/events{/privacy}
https://api.github.com/users/DavidRConnell/followers
https://api.github.com/users/DavidRConnell/following{/other_user}
https://api.github.com/users/DavidRConnell/gists{/gist_id}
https://github.com/DavidRConnell
DavidRConnell
MDQ6VXNlcjM1NDcwNzQw
https://api.github.com/users/DavidRConnell/orgs
https://api.github.com/users/DavidRConnell/received_events
https://api.github.com/users/DavidRConnell/repos
https://api.github.com/users/DavidRConnell/starred{/owner}{/repo}
https://api.github.com/users/DavidRConnell/subscriptions
User
https://api.github.com/users/DavidRConnell
public
NONE
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/datasets/pr_7438). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
2025-07-23T12:43:10Z
https://github.com/huggingface/datasets/pull/7438#issuecomment-3107929370
https://api.github.com/repos/huggingface/datasets/issues/7438
IC_kwDODunzps65Pz0a
https://api.github.com/repos/huggingface/datasets/issues/comments/3107929370/reactions
2025-07-23T12:43:10Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3107929370
https://avatars.githubusercontent.com/u/99929124?v=4
https://api.github.com/users/HuggingFaceDocBuilderDev/events{/privacy}
https://api.github.com/users/HuggingFaceDocBuilderDev/followers
https://api.github.com/users/HuggingFaceDocBuilderDev/following{/other_user}
https://api.github.com/users/HuggingFaceDocBuilderDev/gists{/gist_id}
https://github.com/HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev
U_kgDOBfTMJA
https://api.github.com/users/HuggingFaceDocBuilderDev/orgs
https://api.github.com/users/HuggingFaceDocBuilderDev/received_events
https://api.github.com/users/HuggingFaceDocBuilderDev/repos
https://api.github.com/users/HuggingFaceDocBuilderDev/starred{/owner}{/repo}
https://api.github.com/users/HuggingFaceDocBuilderDev/subscriptions
User
https://api.github.com/users/HuggingFaceDocBuilderDev
public
CONTRIBUTOR
Thank you
2025-07-23T17:56:22Z
https://github.com/huggingface/datasets/pull/7438#issuecomment-3109579908
https://api.github.com/repos/huggingface/datasets/issues/7438
IC_kwDODunzps65WGyE
https://api.github.com/repos/huggingface/datasets/issues/comments/3109579908/reactions
2025-07-23T17:56:22Z
https://api.github.com/repos/huggingface/datasets/issues/comments/3109579908
https://avatars.githubusercontent.com/u/35470740?v=4
https://api.github.com/users/DavidRConnell/events{/privacy}
https://api.github.com/users/DavidRConnell/followers
https://api.github.com/users/DavidRConnell/following{/other_user}
https://api.github.com/users/DavidRConnell/gists{/gist_id}
https://github.com/DavidRConnell
DavidRConnell
MDQ6VXNlcjM1NDcwNzQw
https://api.github.com/users/DavidRConnell/orgs
https://api.github.com/users/DavidRConnell/received_events
https://api.github.com/users/DavidRConnell/repos
https://api.github.com/users/DavidRConnell/starred{/owner}{/repo}
https://api.github.com/users/DavidRConnell/subscriptions
User
https://api.github.com/users/DavidRConnell
public
@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.