-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
TYP: Type MaskedArray.repeat
, improve overloads for NDArray.repeat
, generic.repeat
, and np.repeat
#28849
New issue
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
Conversation
np.ma.repeat
and MaskedArray.repeat
np.ma.repeat
, improve overloads for NDArray.repeat
, generic.repeat
, and np.repeat
Diff from mypy_primer, showing the effect of this PR on type check results on a corpus of open source code: pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/reshape/concat.py:936: error: Generator has incompatible item type "ndarray[tuple[int, ...], dtype[Any]]"; expected "ndarray[tuple[int], dtype[Any]]" [misc]
+ pandas/core/reshape/concat.py:940: error: Argument 1 to "append" of "list" has incompatible type "ndarray[tuple[int, ...], dtype[Any]]"; expected "ndarray[tuple[int], dtype[Any]]" [arg-type]
|
np.ma.repeat
, improve overloads for NDArray.repeat
, generic.repeat
, and np.repeat
MaskedArray.repeat
, improve overloads for NDArray.repeat
, generic.repeat
, and np.repeat
relevant |
The change to @mroeschke since you worked on pandas-dev/pandas#61265, perhaps you are willing to share your thoughts on this change? |
I'm fine to adapt to these typing changes in pandas (mostly by adding |
Good to hear, thanks! |
Thanks Marco |
…eat``, ``generic.repeat``, and ``np.repeat`` (numpy#28849)
No description provided.