Skip to content

Conversation

hgt312
Copy link
Contributor

@hgt312 hgt312 commented Aug 12, 2019

unique has is consistent axes order (except the chosen one) when axis is not None now.
Details in #14244.

Change

Using moveaxis instead of swapaxes when implementation, so that the ordering
of axes except the axis in arguments will not be broken.

@charris charris changed the title BUG: fix inconsistent axes ordering when uses axis in operator unique BUG: fix inconsistent axes ordering for axis in function unique Aug 12, 2019
@charris
Copy link
Member

charris commented Aug 14, 2019

Hmm, I assume that this changes the current behavior. Is it documented anywhere?

@hgt312
Copy link
Contributor Author

hgt312 commented Aug 14, 2019

Should I add something in docstring?

@seberg
Copy link
Member

seberg commented Aug 20, 2019

I think it aligns the behaviour wrt. sorting with the current documentation? So if we assume that the sort order was too strange to rely on, release notes should be sufficient, I think.

improve release note according to review
@mattip mattip requested a review from seberg September 12, 2019 23:17
@seberg
Copy link
Member

seberg commented Sep 12, 2019

Thanks for the ping and thanks @hgt312! Yes, I think this can go in. It does indeed change behaviour, but the previous behaviour returned unexpected sorting (in odd corner cases), so as I said, I think this should be fine. If anyone seriously disagress, just say so.

@seberg seberg merged commit e97975a into numpy:master Sep 12, 2019
@seberg
Copy link
Member

seberg commented Sep 12, 2019

Ah, shit, should have squashed :(, oh well.

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

Successfully merging this pull request may close these issues.

4 participants