Fix assertEqual's handling of numpy array inputs (#48217)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/47948
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48217
Reviewed By: mrshenli
Differential Revision: D25119607
Pulled By: mruberry
fbshipit-source-id: efe84380d3797d242c2aa7d43d2209bcba89cee0