Skip to content

Get the style directly from the broadcasted object (since julia v1.10) #832

Closed

Description

@rcalxrc08

In order to get the style you do the following:

bcs = Broadcast.BroadcastStyle(typeof(bc))

While from julia 1.10 the style is directly contained inside the broadcasted object:
https://github.com/JuliaLang/julia/blob/95f30e51f4158dd3421cd5b8098849d24e97e497/base/broadcast.jl#L170

Activity

  1. devmotion commented on Jan 20, 2026

    @devmotion
    Member

    I don't think this is an actual issue. In fact, BroadcastStyle(typeof(x)) is the documented way to obtain the style (for any object, not only Broadcasted objects), whereas the fields of Broadcasted are not documented and hence internal implementation details.

  2. rcalxrc08 commented on Jan 20, 2026

    @rcalxrc08
    Author

    Agreed actually, just checked the docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions