Skip to content
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

feature request: nj.argmax and similar function #147

Open
Jisan901 opened this issue Apr 20, 2024 · 1 comment · May be fixed by #149
Open

feature request: nj.argmax and similar function #147

Jisan901 opened this issue Apr 20, 2024 · 1 comment · May be fixed by #149

Comments

@Jisan901
Copy link

Numpy has np.argmax, np.argmin, so as a alternative we need those functions

@Jisan901
Copy link
Author

There is an example for contributor or maintainer

>>> a = np.arange(6).reshape(2,3) + 10
>>> a
array([[10, 11, 12],
       [13, 14, 15]])
>>> np.argmax(a)
5
>>> np.argmax(a, axis=0) # at y axis 13>10 and 14>11 and 15>12
array([1, 1, 1])
>>> np.argmax(a, axis=1) # x axis
array([2, 2])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant