Skip to content

broadcast should not drop zero-dimensional results to scalars #28866

@ZeppLu

Description

@ZeppLu
julia> map(typeof, (zeros(), ones(), fill(3.14)))
(Array{Float64,0}, Array{Float64,0}, Array{Float64,0})

julia> typeof(ones() .* fill(3.14))
Float64

julia> typeof(zeros() + ones())  # in fact not only after broadcast
Float64

Is it a bug, or a feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrays[a, r, r, a, y, s]breakingThis change will break codebroadcastApplying a function over a collectiondesignDesign of APIs or of the language itself

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions