Support `__rand__`, `__ror__` and `__rxor__` (#59240)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/58120.
This PR implements `torch.Tensor.{__rand__/__ror__/__rxor__}` for the compatibility with NumPy’s interface.
(cc: mruberry, rgommers, emcastillo, kmaehashi)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59240
Reviewed By: ngimel
Differential Revision: D29482304
Pulled By: mruberry
fbshipit-source-id: 13789202c1d8dddf8658a45381aeedcc31e2f603