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

mention Ref for scalarizing a broadcast argument #45244

Closed
wants to merge 2 commits into from

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented May 9, 2022

The manual mentions tuples for treating a broadcast argument as a scalar, but it doesn't mention Ref (which seems to be quite common, and is even mentioned in the docstring for Ref).

@stevengj stevengj added docs This change adds or pertains to documentation broadcast Applying a function over a collection labels May 9, 2022
@Liozou
Copy link
Member

Liozou commented May 9, 2022

Since Ref is mutable, there was a potential performance issue which led to the discussion at #35591. But the compiler may be able to work around this issue now, I don't know.

@Moelf
Copy link
Contributor

Moelf commented May 9, 2022

IIRC compiler handles Ref quite well

@stevengj
Copy link
Member Author

stevengj commented May 9, 2022

Oh, I see. Seems like this might become Fill after #39184, but probably best to close for now.

@stevengj stevengj closed this May 9, 2022
@giordano giordano deleted the stevengj-patch-3 branch May 11, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcast Applying a function over a collection docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants