Skip to content

Conversation

@lewtun
Copy link
Member

@lewtun lewtun commented Jul 9, 2021

This PR follows up on #2612 to use numpy.ndarray.item instead of numpy.ndarray.tolist as the latter is somewhat confusing to the developer (even though it works).

Judging from the numpy docs, ndarray.item is closer to what we want: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.item.html#numpy-ndarray-item

PS. Sorry for the duplicate work here. I should have read the numpy docs more carefully in #2612

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.

Much better indeed :p

@lhoestq lhoestq merged commit 2c81686 into huggingface:master Jul 9, 2021
@albertvillanova albertvillanova added this to the 1.10 milestone Jul 12, 2021
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.

3 participants