Skip to content

Conversation

zbjornson
Copy link
Contributor

This fixes the readme to reflect the current actual behavior. avx512_qsort behaves differently from argsort and qselect, and I'm not sure if that's intentional. #49 changed the behavior to move the bit-exact NaNs to the end of the array for those two functions only.

I also reworded it to state that the behavior is undefined if hasbool=false but the input has NaNs. That's the case because:

  • If the fallback to std::sort is encountered, there's no defined behavior w.r.t. NaNs.
  • The bitonic networks use vminps/vmaxps, which produce the second operand if one operand is NaN, and which value is the second operand varies.

Copy link
Member

@r-devulap r-devulap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing it!

@r-devulap r-devulap merged commit 527248c into numpy:main Sep 14, 2023
@zbjornson zbjornson deleted the zb/nan-readme branch September 14, 2023 16:29
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.

2 participants