Skip to content

Fix is_sorted_nb NaN parity - #868

Open
mameikagou wants to merge 1 commit into
polakowo:masterfrom
mameikagou:codex/fix-is-sorted-nan-parity
Open

Fix is_sorted_nb NaN parity#868
mameikagou wants to merge 1 commit into
polakowo:masterfrom
mameikagou:codex/fix-is-sorted-nan-parity

Conversation

@mameikagou

Copy link
Copy Markdown

Summary

  • make is_sorted_nb reject unordered adjacent comparisons, matching
    is_sorted when an array contains NaN
  • add a regression assertion for both implementations

Previously, < returned false for a NaN pair and the Numba implementation
could incorrectly report the array as sorted.

Testing

  • pytest -q tests/ (940 passed, 100 skipped)
  • Black check
  • python -m compileall vectorbt
  • git diff --check

@mameikagou
mameikagou marked this pull request as ready for review August 21, 2026 21:51
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.

1 participant