[numpy compatibility]Fix `argmin/argmax` when multiple max/min values (#42004)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/41998
Fixes https://github.com/pytorch/pytorch/issues/22853
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42004
Reviewed By: ngimel
Differential Revision: D23049003
Pulled By: mruberry
fbshipit-source-id: a6fddbadfec4b8696730550859395ce4f0cf50d6