Skip to content

Conversation

@kgryte
Copy link
Contributor

@kgryte kgryte commented Nov 4, 2021

This PR

  • resolves Specify NaN behaviour in unique() #249 by requiring uniqueness be determined based on value equality (==).
  • requires that NaN values be considered distinct when returning the unique elements of an array. Accordingly, if an array contains multiple NaN values, the returned array will also contain multiple NaN values.
  • specifies that signed zeros be treated as equal. As a consequence, reconstructing an array containing signed zeros is not guaranteed to return the exact same array. Treating signed zeros as equal is the current prevailing behavior among array libraries (NumPy, MXNet, TF, ...).

@kgryte kgryte added the Maintenance Bug fix, typo fix, or general maintenance. label Nov 4, 2021
@kgryte kgryte added this to the v2021 milestone Nov 4, 2021
@kgryte
Copy link
Contributor Author

kgryte commented Nov 4, 2021

The changes introduced in this PR were discussed and approved during the consortium meeting held on 21 October 2021. Will merge. Any further changes can be addressed in follow-up PRs.

@kgryte kgryte merged commit e3e1a46 into main Nov 4, 2021
@kgryte kgryte deleted the nan-unique branch November 4, 2021 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintenance Bug fix, typo fix, or general maintenance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specify NaN behaviour in unique()

2 participants