mypy infers Any
for numpy 2.2.2. expressions that worked with 2.2.1
#18496
Labels
bug
mypy got something wrong
Any
for numpy 2.2.2. expressions that worked with 2.2.1
#18496
Bug Report
mypy infers
Any
for several numpy expressions after upgrading tonumpy==2.2.2
See also
np.maximum(np.array(1), np.array(1))
isAny
in 2.2.2 while it wasn't in 2.2.1 numpy/numpy#28193np.mod(npt.NDArray, Any)
isAny
in 2.2.2 while it wasn't in 2.2.1 numpy/numpy#28192To Reproduce
Expected Behavior
ndarray[tuple[int, ...], dtype[Any]]
Actual Behavior
Any
Your Environment
This works with
numpy==2.2.1
; also, it works withpyright
. So it seems to be specific tonumpy==2.2.2
andmypy
.mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: