fix numpy compatibility in test for `torch.kthvalue` (#59214)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/59201. Should be merged after https://github.com/pytorch/pytorch/issues/59067 to ensure this actually working correctly.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59214
Reviewed By: albanD
Differential Revision: D28792363
Pulled By: mruberry
fbshipit-source-id: 0cf613463139352906fb567f1efcc582c2c25de8