use npt.NDArray instead of np.ndarray in type annotations
Summary:
X-link: https://github.com/pytorch/pytorch/pull/136288
To facilitate PSS-2 upgrade, this uses `ndt.NDArray` instead of `nd.ndarray` in type annotations. In Numpy-1.19 (PSS-1) it's an alias to `nd.ndarray` -- a noop.
In Numpy-1.24, `ndt.NDArray` a proper generic type, and without this change uses of `nd.ndarray` generate this Pyre type error:
```counterexample
Invalid type parameters [24]: Generic type `np.ndarray` expects 2 type parameters.
```
Reviewed By: kit1980
Differential Revision: D62977370
fbshipit-source-id: f7bc1f621f643e1a1896def4651c5eb132e53f78