You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interestingly, it appears that this bug is not limited to mypy (xref python/mypy#11347).
Annoying as it is, I'm wondering if it might be best to temporarily remove the dunder overloads...
It's funny that only - is concerned, not +, *, or /.
The problem is that self annotations are ignored when a Any-parametrized object is passed to an overload method.
So what happens is that np.ndarray (or equivalently np.ndarray[Any, Any]) will just pick whatever happens to be the first overload, which turns out to be to NoReturn overload used for boolean arrays:
Describe the issue:
Running
on
gives
The vector operations
+
,*
,/
work fine.NumPy/Python version information:
1.21.3 3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0]
The text was updated successfully, but these errors were encountered: