feat: support numba compiled `sort` and `argsort` functions
Description
This PR introduces Numba compiled function sort and argsort for certain kind of sorting algorithms that are supported by Numba (See this).
Related Issue
- [X] Closes https://github.com/pymc-devs/pytensor/issues/1151
Checklist
- [X] Checked that the pre-commit linting/style checks pass
- [X] Included tests that prove the fix is effective or that the new feature works
- [ ] Added necessary documentation (docstrings and/or example notebooks)
- [ ] If you are a pro: each commit corresponds to a relevant logical change
Type of change
- [X] New feature / enhancement
- [ ] Bug fix
- [ ] Documentation
- [ ] Maintenance
- [ ] Other (please specify):
📚 Documentation preview 📚: https://pytensor--1309.org.readthedocs.build/en/1309/
It looks like there's some syntax that isn't python 3.10 compatible. We're following the numpy depreciation schedule, so we should still support python 3.10 for one more week
It looks like there's some syntax that isn't python 3.10 compatible. We're following the numpy depreciation schedule, so we should still support python 3.10 for one more week
Aw indeed! I changed the syntax to be compatible with Python 3.10 :smile:
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.02%. Comparing base (
a149f6c) to head (8726955). Report is 178 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1309 +/- ##
==========================================
+ Coverage 82.00% 82.02% +0.01%
==========================================
Files 188 203 +15
Lines 48478 48837 +359
Branches 8665 8691 +26
==========================================
+ Hits 39755 40058 +303
- Misses 6575 6627 +52
- Partials 2148 2152 +4
| Files with missing lines | Coverage Δ | |
|---|---|---|
| pytensor/link/numba/dispatch/basic.py | 80.38% <100.00%> (+2.53%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Thanks for this!