[numpy] Add torch.nan_to_num (#44592)
Summary:
Reference https://github.com/pytorch/pytorch/issues/42515
TODO:
* [x] Add tests
* [x] Add docs
Pull Request resolved: https://github.com/pytorch/pytorch/pull/44592
Reviewed By: colesbury
Differential Revision: D24079472
Pulled By: mruberry
fbshipit-source-id: 2b67d36cba46eaa7ca16cd72671b57750bd568bc