Skip to content

CLN: Prelims for stronger typing in Block methods #32712

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

Merged
merged 1 commit into from
Mar 16, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@@ -872,6 +872,7 @@ def __getitem__(self, key):

if com.is_bool_indexer(key):
key = check_bool_indexer(self.index, key)
key = np.asarray(key, dtype=bool)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn’t check_bool_indexer guarantee this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was surprised by this too, but no

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's investigate if we can do this inside check_bool_indexer (either open an issue or do as a followon)

@@ -872,6 +872,7 @@ def __getitem__(self, key):

if com.is_bool_indexer(key):
key = check_bool_indexer(self.index, key)
key = np.asarray(key, dtype=bool)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, let's investigate if we can do this inside check_bool_indexer (either open an issue or do as a followon)

@jreback jreback added the Typing type annotations, mypy/pyright type checking label Mar 16, 2020
@jreback jreback added this to the 1.1 milestone Mar 16, 2020
@jreback jreback merged commit b7c9c56 into pandas-dev:master Mar 16, 2020
@jbrockmendel jbrockmendel deleted the cln-diff branch March 16, 2020 14:59
SeeminSyed pushed a commit to CSCD01-team01/pandas that referenced this pull request Mar 22, 2020
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 this pull request may close these issues.

2 participants