benchmark
06e35fc5 - replace uses of np.ndarray with npt.NDArray

Commit
1 year ago
replace uses of np.ndarray with npt.NDArray Summary: X-link: https://github.com/pytorch/opacus/pull/681 X-link: https://github.com/pytorch/captum/pull/1389 X-link: https://github.com/pytorch/botorch/pull/2586 X-link: https://github.com/pytorch/audio/pull/3846 This replaces uses of `numpy.ndarray` in type annotations with `numpy.typing.NDArray`. In Numpy-1.24.0+ `numpy.ndarray` is annotated as generic type. Without template parameters it triggers static analysis errors: ```counterexample Generic type `ndarray` expects 2 type parameters. ``` `numpy.typing.NDArray` is an alias that provides default template parameters. Reviewed By: ryanthomasjohnson Differential Revision: D64619891 fbshipit-source-id: dffc096b1ce90d11e73d475f0bbcb8867ed9ef01
Author
Parents
Loading