Skip to content

REF: share check_value_size #40009

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
Feb 24, 2021

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added the Refactor Internal refactoring of code label Feb 24, 2021
@jreback jreback added this to the 1.3 milestone Feb 24, 2021
@jreback jreback merged commit d527b88 into pandas-dev:master Feb 24, 2021
@jbrockmendel jbrockmendel deleted the ref-check_value_size branch February 24, 2021 00:33
@@ -39,6 +40,21 @@
from pandas import Index


def check_value_size(value, mask: np.ndarray, length: int):
Copy link
Member

Choose a reason for hiding this comment

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

as this is also masking the values, a different name may be more appropriate.

or maybe return none. just do the validation here and just repeat the masking in the array functions, so it it is clear to readers what is going on.

Copy link
Member Author

Choose a reason for hiding this comment

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

just do the validation here and just repeat the masking in the array functions, so it it is clear to readers what is going on.

thats not a bad idea. i think we do something similar in array_algos.putmask

@simonjayhawkins simonjayhawkins added the ExtensionArray Extending pandas with custom dtypes or arrays. label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants