-
Notifications
You must be signed in to change notification settings - Fork 14
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
Issues around auto visualization row/column preference specification #17
base: main
Are you sure you want to change the base?
Conversation
vyeevani
commented
Aug 7, 2024
- Fixing bugs in the named array row/column reference
- Adding support for ordering inheritance from the preferred row and column list.
- Adding support for ordering inheritance from the preferred row and column list.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
Thanks for the PR! I'm not sure I fully understand the reasons behind these changes, so it would be great if you could explain them a bit more.
Also, could you sign the CLA in the comment above?
for column_key in self.prefers_column: | ||
for info in array_axis_info: | ||
if isinstance(info, NamedPositionalAxisInfo | NamedPositionlessAxisInfo | PositionalAxisInfo): | ||
if info.logical_key() == column_key: | ||
column_axes.append(info) | ||
|
||
for row_key in self.prefers_row: | ||
for info in array_axis_info: | ||
if isinstance(info, NamedPositionalAxisInfo | NamedPositionlessAxisInfo | PositionalAxisInfo): | ||
if info.logical_key() == row_key: | ||
row_axes.append(info) |
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 change this to a double loop? I think the original loop structure will be faster and avoid unnecessary checks for axes that are not named.
Also, are you trying to add support for preferring integer axis positions? I don't think this works correctly since NamedPositionalAxisInfo
has both a name and a position and the logical_key
just returns one of them.
if isinstance(ax, PositionalAxisInfo | NamedPositionalAxisInfo): | ||
return (0, -ax.axis_logical_index) | ||
elif ax in unassigned: | ||
if ax in unassigned: |
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 change this?