10000 Typing: Unexpected keyword argument `kind` for `isin` · Issue #24491 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Typing: Unexpected keyword argument kind for isin #24491

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
bersbersbers opened this issue Aug 22, 2023 · 0 comments · Fixed by #24527
Closed

Typing: Unexpected keyword argument kind for isin #24491

bersbersbers opened this issue Aug 22, 2023 · 0 comments · Fixed by #24527
Labels

Comments

@bersbersbers
Copy link
Contributor

Describe the issue:

The implementation of isin has a kind argument

def isin(element, test_elements, assume_unique=False, invert=False, *,
kind=None):

that is missing in the type hints:

def isin(
element: ArrayLike,
test_elements: ArrayLike,
assume_unique: bool = ...,
invert: bool = ...,
) -> NDArray[bool_]: ...

Reproduce the code example:

import numpy as np

np.isin([1, 2, 3], [1], kind="table")

Error message:

# mypy bug.py
bug.py:3: error: Unexpected keyword argument "kind" for "isin"  [call-arg]
bug.py:3: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-call-arg for more info
Found 1 error in 1 file (checked 1 source file)

Runtime information:

numpy 1.25.2
mypy 1.5.1 (compiled: yes)
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]

Context for the issue:

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
2AC0
0