You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> x =ComponentArray(a=5, b=[4, 1], c = [12; 34], d=(e=2, f=[6, 30.0]));
julia>@static_unpack a, b, c, d = x;
julia> a
5.0
julia> b
2-element SVector{2, Float64} with indices SOneTo(2):4.01.0
julia> c
2×2 SMatrix{2, 2, Float64, 4} with indices SOneTo(2)×SOneTo(2):1.02.03.04.0
julia> d
ComponentVector{Float64,SubArray...}(e =2.0, f = [6.0, 30.0])
Minimal Reproducible Example 👇
This is what I get:
julia> x =ComponentArray(a=5, b=[4, 1], c = [12; 34], d=(e=2, f=[6, 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})
The type `StaticArraysCore.SVector{2}` exists, but no method is defined for this combination of argument types when trying to construct it.
Stacktrace:
[1] _maybe_SArray(x::SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}, ::Val{2}, ::FlatAxis)
@ ComponentArrays ~/.julia/packages/ComponentArrays/7tm5j/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/7tm5j/src/compat/static_arrays.jl:9
[4] top-level scope
@ REPL[50]:1
Some type information was truncated. Use `show(err)` to see complete types.
Environment (please complete the following information):
Describe the bug 🐞
The example for
@static_unpack
inv0.15
release notes (see NEWS.md) fails.Expected behavior
Straight from the NEWS.md:
Minimal Reproducible Example 👇
This is what I get:
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
The text was updated successfully, but these errors were encountered: