GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Typing: Unexpected keyword argument `kind` for `isin` · Issue #24491 · numpy/numpy

Typing: Unexpected keyword argument kind for isin #24491

New issue
Copy link
New issue
Copy link
Closed
#24527
Closed
Typing: Unexpected keyword argument kind for isin#24491
#24527
Copy link
Labels
00 - Bug

Description

@bersbersbers
bersbersbers
opened on Aug 22, 2023
Issue body actions

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

Activity

  1. bersbersbers
    added
    00 - Bug
    on Aug 22, 2023
  2. jakevdp
    added 2 commits that reference this issue on Aug 24, 2023

    Typing: add kind argument to numpy.isin

    This issue will close once commit 050382b is merged into the 'master' branch.
    050382b

    TYP: add kind argument to numpy.isin type specification

    This issue will close once commit d75fcfe is merged into the 'master' branch.
    d75fcfe
  3. rgommers
    closed this as completedin #24527on Aug 25, 2023
  4. rgommers
    added a commit that references this issue on Aug 25, 2023

    TYP: add kind argument to numpy.isin type specification (#24527)

    This issue will close once commit c790693 is merged into the 'main' branch.
    c790693
  5. charris
    added a commit that references this issue on Aug 25, 2023

    TYP: add kind argument to numpy.isin type specification (numpy#24527)

    This issue will close once commit 603311d is merged into the 'main' branch.
    603311d
  6. charris
    added a commit that references this issue on Nov 11, 2023

    TYP: add kind argument to numpy.isin type specification (numpy#24527)

    This issue will close once commit a2725d9 is merged into the 'main' branch.
    a2725d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    00 - Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.