We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9a2ce84 + b1312c4 commit 4aed473Copy full SHA for 4aed473
src/ArrayInterface.jl
@@ -489,8 +489,18 @@ function __init__()
489
return StaticArrays.LU(L, U, p)
490
end
491
492
- function restructure(x::StaticArrays.SArray,y)
493
- error("Currently not supported")
+ function restructure(x::StaticArrays.SArray,y::StaticArrays.SArray)
+ reshape(y,StaticArrays.Size(x))
494
+ end
495
+
496
+ function restructure(x::StaticArrays.SArray{S},y::Array) where S
497
+ StaticArrays.SArray{S}(y)
498
499
500
+ @require Adapt="79e6a3ab-5dfb-504d-930d-738a2a938a0e" begin
501
+ function Adapt.adapt_storage(::Type{<:StaticArrays.SArray{S}},xs::Array) where S
502
+ StaticArrays.SArray{S}(xs)
503
504
505
506
0 commit comments