Skip to content

real(::Fill) gives an array of arrays? #145

@mcabbott

Description

@mcabbott

This is surprising:

julia> real(Fill(1+im)) isa Array{<:AbstractArray{Int}}
true

julia> real(fill(1+im)) isa Array{Int,0}
true

(jl_AeiBcQ) pkg> st
      Status `/private/var/folders/yq/4p2zwd614y59gszh7y9ypyhh0000gn/T/jl_AeiBcQ/Project.toml`
  [1a297f60] FillArrays v0.11.7

I guess it comes from this difference, via broadcast_preserving_zero_d:

julia> Fill(1) .+ Fill(2)
0-dimensional Fill{Int64}, with entry equal to 3

julia> fill(1) .+ fill(2)
3

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