Please see https://github.com/microsoft/pyright/issues/2866 for a detailed explanation of the problem. ### NumPy/Python version information: Numpy 1.22, Python 3.10