Skip to content

Commit dfef4b8

Browse files
Merge pull request #405 from gaurav-arya/ag-staticrestructure
Expertiment with fixing static array restructure method
2 parents 9c94c10 + f0dc9f1 commit dfef4b8

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

ext/ArrayInterfaceStaticArraysCoreExt.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ function ArrayInterface.lu_instance(_A::StaticArraysCore.StaticMatrix{N,N}) wher
3030
lu(one(_A))
3131
end
3232

33-
function ArrayInterface.restructure(x::StaticArraysCore.SArray{S,T,N}, y::StaticArraysCore.SArray) where {S,T,N}
34-
StaticArraysCore.SArray{S,T,N}(y)
35-
end
3633
ArrayInterface.restructure(x::StaticArraysCore.SArray{S}, y) where {S} = StaticArraysCore.SArray{S}(y)
3734

3835
end

test/staticarrayscore.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ y = @SVector rand(4)
2222
yr = ArrayInterface.restructure(x, y)
2323
@test yr isa SMatrix{2, 2}
2424
@test Base.size(yr) == (2,2)
25-
@test vec(yr) == vec(Float32.(y))
25+
@test vec(yr) == vec(y)
2626
z = rand(4)
2727
zr = ArrayInterface.restructure(x, z)
2828
@test zr isa SMatrix{2, 2}

0 commit comments

Comments
 (0)