searchsorted should get a `axis` kwarg
See original GitHub issueIs there a technical reason why searchsorted
only works with 1d arrays? In a current problem, I have an array v.shape = (61, 160, 320)
and an array a.shape = (1, 160, 320)
. It would be great if I could do np.searchsorted(a, v, axis=0)
to yield a (1, 160, 320)
array of the searched indices.
Issue Analytics
- State:
- Created 10 years ago
- Reactions:11
- Comments:18 (10 by maintainers)
Top Results From Across the Web
applying numpy.searchsorted over multiple axes
I have to perform this operation many times, and I'm trying to find an efficient way to do so. Ultimately, I'd like to...
Read more >aalaja/numpy-array-operations - Jovian
This function is used to return the indices of the maximum values along an axis. For example, this function can be applied practically...
Read more >numpy.argsort — NumPy v1.24 Manual
It returns an array of indices of the same shape as a that index data along the given axis in sorted order. Parameters:...
Read more >pandas.Series.idxmin — pandas 1.5.2 documentation
If the entire Series is NA, the result will be NA. *args, **kwargs ... Return indices of the minimum values along the given...
Read more >API Changes — Matplotlib 1.3.1 documentation - omz:software
If you have code that modified these, you will need to make a deepcopy first ... Axes.bar() method accepts a error_kw kwarg; it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any progress with this? I’m also looking for an axis argument to
searchsorted
+1 on a need for this. Major performance bottleneck in my application.