We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report
False-positive "Argument 1 to np.concatenate has incompatible type"
To Reproduce
import numpy as np print(np.concatenate((np.array([1]), [2])))
Expected Behavior
python bug.py works fine, printing [1 2], so I would expect mypy bug.py not to report an error.
python bug.py
[1 2]
mypy bug.py
Actual Behavior
Argument 1 to "concatenate" has incompatible type "Tuple[ndarray[Any, dtype[Any]], List[int]]"; expected "Union[_SupportsArray[dtype[]], Sequence[_SupportsArray[dtype[]]], Sequence[Sequence[_SupportsArray[dtype[]]]], Sequence[Sequence[Sequence[_SupportsArray[dtype[]]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype[]]]]]]]"
Your Environment
mypy.ini
The text was updated successfully, but these errors were encountered:
This is related to numpy/numpy#20901 and appears to be an @overload issue of some description.
@overload
I can confirm this still exists on numpy 1.22.4 and mypy 1.1.1
Sorry, something went wrong.
This seems like an issue in numpy. Please report a mypy issue only if you believe mypy is behaving incorrectly.
concatenate
No branches or pull requests
Bug Report
False-positive "Argument 1 to np.concatenate has incompatible type"
To Reproduce
Expected Behavior
python bug.py
works fine, printing[1 2]
, so I would expectmypy bug.py
not to report an error.Actual Behavior
Your Environment
mypy.ini
(and other config files): noneThe text was updated successfully, but these errors were encountered: