Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add equals_nan kwarg to np.unique #21646

Merged
merged 6 commits into from Jun 2, 2022

Conversation

charris
Copy link
Member

@charris charris commented Jun 2, 2022

Backport of #21623.

Addresses #20326

np.unique previously had it's functionality changed so NaN values would be treated as non-unique.
This PR puts the functionality into the kwarg equal_nans(default: True).

Backport of #21644.

The other similar arguments in the testing functions and np.array_equal
use equal_nan and not equal_nans (with plural s). So it seems we
should use that here as well for consistency.

Does some very minor style fixes otherwise.

rjeb and others added 6 commits June 2, 2022 10:38
Co-authored-by: Matti Picus <matti.picus@gmail.com>
Co-authored-by: Matti Picus <matti.picus@gmail.com>
The other similar arguments in the testing functions and `np.array_equal`
use `equal_nan` and not `equal_nans` (with plural s).  So it seems we
should use that here as well for consistency.

Does some very minor style fixes otherwise.
@charris charris added this to the 1.23.0 release milestone Jun 2, 2022
@charris charris merged commit 5f71e94 into numpy:maintenance/1.23.x Jun 2, 2022
@charris charris deleted the backport-21623-21644 branch June 2, 2022 17:52
@charris charris added the 08 - Backport Used to tag backport PRs label Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - Enhancement 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants