Dearests,
I found that the very first example for the macro at-static_unpack of ComponentArrays is not working
julia> x = ComponentArray(a=5, b=[4, 1], c = [1 2; 3 4], d=(e=2, f=[6, 30.0]))
ComponentVector{Float64}(a = 5.0, b = [4.0, 1.0], c = [1.0 2.0; 3.0 4.0], d = (e = 2.0, f = [6.0, 30.0])
julia> @static_unpack a, b, c, d = x
ERROR: MethodError: no method matching (StaticArraysCore.SVector{2})(::SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true})
Stacktrace:
[1] _maybe_SArray(x::SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}, ::Val{2}, ::FlatAxis)
@ ComponentArrays ~/.julia/packages/ComponentArrays/pROOT/src/compat/static_arrays.jl:5
[2] macro expansion
@ ./abstractarray.jl:0 [inlined]
[3] static_getproperty(ca::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{…}}}, ::Val{:b})
@ ComponentArrays ~/.julia/packages/ComponentArrays/pROOT/src/compat/static_arrays.jl:9
[4] top-level scope
@ REPL[7]:1
Some type information was truncated. Use `show(err)` to see complete types.
Status
Status `~/SCRA/LEO/Project.toml`
[b0b7db55] ComponentArrays v0.15.13
[e41cd558] DCAUtils v1.0.1
[033835bb] JLD2 v0.4.48
[429524aa] Optim v1.9.4
[e88e6eb3] Zygote v0.6.70
Versioninfo
julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (x86_64-apple-darwin22.4.0)
CPU: 12 × Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 11 on 12 virtual cores
Environment:
DYLD_LIBRARY_PATH = /Users/pagnani/lib/yeppp-1.0.0/binaries/macosx/x86_64:/usr/local/cuda/lib:/Developer/NVIDIA/CUDA-6.5/lib:
LD_LIBRARY_PATH = /Users/pagnani/.julia/conda/3/lib/:/opt/local/lib/mariadb/mysql/
JULIA_NUM_THREADS = 8
JULIA_EDITOR = xem
Thanks
A