Skip to content

Axes not defined #87

@baggepinnen

Description

@baggepinnen

I got

ax1 = Axis((; x1=1))
ax2 = Axis((; x2=1))
A1 = ComponentMatrix(zeros(1, 1), ax1, ax1)
A2 = ComponentMatrix(zeros(1, 1), ax2, ax2)
[A for A in [A1, A2]]

julia> [A for A in [A1, A2]]
ERROR: UndefVarError: Axes not defined
Stacktrace:
 [1] getaxes(#unused#::Type{ComponentMatrix{Float64}})
   @ ComponentArrays ~/.julia/packages/ComponentArrays/exfK6/src/componentarray.jl:276
 [2] convert(#unused#::Type{ComponentMatrix{Float64}}, x::ComponentMatrix{Float64})
   @ ComponentArrays ~/.julia/packages/ComponentArrays/exfK6/src/similar_convert_copy.jl:46
 [3] setindex!
   @ ./array.jl:839 [inlined]
 [4] copyto!(dest::Vector{ComponentMatrix{Float64}}, src::Tuple{ComponentMatrix{Float64}, ComponentMatrix{Float64}})
   @ Base ./abstractarray.jl:846
 [5] vect(::ComponentMatrix{Float64}, ::Vararg{Any, N} where N)
   @ Base ./array.jl:129
 [6] top-level scope
   @ REPL[24]:1

(@v1.6) pkg> st ComponentArrays
      Status `~/.julia/environments/v1.6/Project.toml`
  [b0b7db55] ComponentArrays v0.9.9

pointing to
https://github.com/jonniedie/ComponentArrays.jl/blob/master/src/componentarray.jl#L276
which is

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