Skip to content

TYP: ensure_platform_int probably needs a dtype annotation #43391

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

Closed
twoertwein opened this issue Sep 3, 2021 · 0 comments · Fixed by #43418
Closed

TYP: ensure_platform_int probably needs a dtype annotation #43391

twoertwein opened this issue Sep 3, 2021 · 0 comments · Fixed by #43418
Labels
Typing type annotations, mypy/pyright type checking
Milestone

Comments

@twoertwein
Copy link
Member

ensure_platform_int is annotated as returning a np.ndarray but its output is used in places that require a Sequence[int]. I assume this can be fixed by adding a dtype to the np.ndarray.

pandas/core/groupby/ops.py:858: error: Argument 1 to "take" of "ExtensionArray" has incompatible type "ndarray[Any, Any]"; expected "Sequence[int]" [arg-type]

@twoertwein twoertwein added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 3, 2021
@simonjayhawkins simonjayhawkins added Typing type annotations, mypy/pyright type checking and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 4, 2021
@simonjayhawkins simonjayhawkins added this to the Contributions Welcome milestone Sep 4, 2021
@simonjayhawkins simonjayhawkins modified the milestones: Contributions Welcome, 1.4 Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants