-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Deprecate util.array.searchsorted in favor of np.searchsorted #816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: oyamad <7353083+oyamad@users.noreply.github.com>
oyamad
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot (Read the comment #813 (comment))
- Abandon all your changes in
array.pyandtest_array.py, and incorporate (or just merge) those in ab0fa74
…ation - Reverted array.py and test_array.py to use the implementation from commit ab0fa74 - This version keeps the JIT-compiled searchsorted but emits deprecation warning - Fixed indentation in markov/core.py line 666 as suggested in code review - Removed unused numpy import from array.py Co-authored-by: oyamad <7353083+oyamad@users.noreply.github.com>
Incorporated the changes from commit ab0fa74. The implementation now keeps the JIT-compiled searchsorted while emitting a deprecation warning via Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The custom
searchsortedfunction was implemented when Numba didn't support thesidekeyword argument fornp.searchsorted. Numba now supports this feature, making the custom implementation redundant.Changes
objmode()while keeping the JIT-compiled implementation for performancenp.searchsortedcallsnp.searchsortedcalls@pytest.mark.filterwarningsdecorator to suppress warnings in main test and added separatetest_warns()function to verify deprecation warningImplementation Details
The deprecated
searchsortedfunction:DeprecationWarningusingobjmode()contextMigration
Users should replace:
With:
The function remains exported for backward compatibility but will be removed in a future release.
util.array.searchsorted#813Original prompt
util.array.searchsorted#813✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.