Skip to content

BUG: array_api.argsort(descending=True) respects relative sort order#20788

Merged
charris merged 2 commits intonumpy:mainfrom
honno:xp-argsort-fix
Jan 12, 2022
Merged

BUG: array_api.argsort(descending=True) respects relative sort order#20788
charris merged 2 commits intonumpy:mainfrom
honno:xp-argsort-fix

Conversation

@honno
Copy link
Copy Markdown
Contributor

@honno honno commented Jan 11, 2022

@charris
Copy link
Copy Markdown
Member

charris commented Jan 11, 2022

Needs a test. Note that it should be fairly easy to add reverse sorts at some point, the big problem is adding a more flexible way to add sort types, they are currently limited by the basic array struct.

@charris charris added the 09 - Backport-Candidate PRs tagged should be backported label Jan 11, 2022
@charris charris added this to the 1.22.1 release milestone Jan 11, 2022
@honno
Copy link
Copy Markdown
Contributor Author

honno commented Jan 12, 2022

Needs a test.

Done!

  • Fix whatevers breaking CI

@charris charris merged commit d7a43df into numpy:main Jan 12, 2022
@charris
Copy link
Copy Markdown
Member

charris commented Jan 12, 2022

Thanks @honno .

charris pushed a commit to charris/numpy that referenced this pull request Jan 12, 2022
numpy#20788)

* BUG: `array_api.argsort(descending=True)` respects relative order

* Regression test for stable descending `array_api.argsort()`
@charris charris changed the title BUG: array_api.argsort(descending=True) respects relative sort order BUG: array_api.argsort(descending=True) respects relative sort order Jan 12, 2022
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jan 12, 2022
@charris charris removed this from the 1.22.1 release milestone Jan 12, 2022
charris pushed a commit to charris/numpy that referenced this pull request Jan 12, 2022
numpy#20788)

* BUG: `array_api.argsort(descending=True)` respects relative order

* Regression test for stable descending `array_api.argsort()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: numpy.array_api.argsort(stable=True, descending=True) does not respect relative order

2 participants