-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: rename get_block_values, simplify #32521
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,11 +231,12 @@ def get_values(self, dtype=None): | |
return self.values.astype(object) | ||
return self.values | ||
|
||
def get_block_values(self, dtype=None): | ||
def get_block_values_for_json(self) -> np.ndarray: | ||
""" | ||
This is used in the JSON C code | ||
This is used in the JSON C code. | ||
""" | ||
return self.get_values(dtype=dtype) | ||
# TODO(2DEA): reshape will be unnecessary with 2D EAs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Putting such comments in several places won't make this happen ... (if you want this, you will need to lead a discussion about it) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. experience shows that discussion turns on amounts of complexity; marking these will allow us to pseudo-quantify that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree with both of you! these do have good placeholders, but am skeptical of 2D EA. |
||
return np.asarray(self.values).reshape(self.shape) | ||
|
||
def to_dense(self): | ||
return self.values.view() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep it as
get_values()
(but remove the dtype, since that is not used) ? The get_values already handles the reshape, avoiding the need to keep track of it here as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because
get_values
is next up on the chopping block