-
-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
Description
Describe the issue:
The implementation of isin has a kind argument
numpy/numpy/lib/arraysetops.py
Lines 767 to 768 in cc91b10
| def isin(element, test_elements, assume_unique=False, invert=False, *, | |
| kind=None): |
that is missing in the type hints:
numpy/numpy/lib/arraysetops.pyi
Lines 331 to 336 in cc91b10
| 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