ITADN

RFC: Deprecate `util.array.searchsorted`

#813Closedoyamad 创建于 2025-10-16
refactor
O
oyamadcommented
Deprecate `searchsorted(a, v)` in `util/array.py` and replace it with `np.searchsorted(a, v, side='right')`. (`Numba` was not supporting the `side` keyword argument when this function was implemented.) 1. Replace any use of `util.array.searchsorted` with `np.searchsorted(a, v, side='right')`. (#811 is such an example.) 2. Rewrite `searchsorted` in `util/array.py` so that it simply returns `np.searchsorted(a, v, side='right')`, emitting `DeprecationWarning`. (Remove this function in some future release.) 3. Rewrite the docstring of `searchsorted` in `util/array.py` accordingly.
关闭于 2025-12-12 1 条评论