idxmax with multiple dimensions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem?
(I thought we had an issue for this, but can't find it after five minutes of looking, so either we don't or I've done a very bad job searching...)
idxmax (+ idxmin) doesn't accept multiple dimensions, but argmax does.
Describe the solution you'd like
Could we implement idxmax as a wrapper of argmax?
Describe alternatives you've considered
No response
Additional context
Possibly it's just me, but fwiw I find the idxmax & argmax terms very confusing, constantly have to look up which is which... I guess it doesn't help that the description of argmax is "Index or indices of the maximum"...! But I'm not sure there's a good way of making these much better — maybe in a vacuum we could have started with names like label_max & index_max, or argmax & iargmax, but tough to change now.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementations of idxmax, idxmin, and argmax, along with their existing tests. Compare how argmax handles multiple dimensions and determine the expected idxmax and idxmin behavior. Done means both methods support the requested multiple-dimension use case with matching test coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100