Moving np function to test area
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23118
Test Plan: Imported from OSS
Differential Revision: D16400634
Pulled By: zafartahirov
fbshipit-source-id: 44872fdf64b20a6b67e5176042fe58c8c2359738