Skip to content
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

Use tidyverse recycling rules #917

Merged
merged 4 commits into from
Sep 7, 2022
Merged

Use tidyverse recycling rules #917

merged 4 commits into from
Sep 7, 2022

Conversation

hadley
Copy link
Member

@hadley hadley commented Sep 6, 2022

Fixes #878

@hadley hadley requested a review from lionel- September 6, 2022 20:30
@hadley hadley marked this pull request as ready for review September 6, 2022 20:30
return out;
}
if (nx != ny && !(nx == 1 || ny == 1)) {
if (nx != ny && nx != 1 && ny != 1) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we unclass data frames and use vec_recycle_common() instead?

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 thought about that too, but I worried (possibly needlessly) about the performance implications of now rep-ing scalars into large vectors instead. And the set of changes seemed small enough.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine merging as is. Just noting that in the future the rep'd scalars would become altrep repetitions so the problem would go away eventually.

@hadley hadley merged commit a118aec into main Sep 7, 2022
@hadley hadley deleted the vctrs-recycle branch September 7, 2022 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure that recycling uses tidyverse rules
2 participants