Skip to content

Commit 7c5d183

Browse files
Merge pull request #429 from jecs/master
Fixed can_setindex for MArray
2 parents 43748d9 + ae06bba commit 7c5d183

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ArrayInterface"
22
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
3-
version = "7.7.0"
3+
version = "7.7.1"
44

55
[deps]
66
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

ext/ArrayInterfaceStaticArraysCoreExt.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ ArrayInterface.ismutable(::Type{<:StaticArraysCore.MArray}) = true
2424
ArrayInterface.ismutable(::Type{<:StaticArraysCore.SizedArray}) = true
2525

2626
ArrayInterface.can_setindex(::Type{<:StaticArraysCore.StaticArray}) = false
27+
ArrayInterface.can_setindex(::Type{<:StaticArraysCore.MArray}) = true
2728
ArrayInterface.buffer(A::Union{StaticArraysCore.SArray,StaticArraysCore.MArray}) = getfield(A, :data)
2829

2930
function ArrayInterface.lu_instance(_A::StaticArraysCore.StaticMatrix{N,N}) where {N}

test/staticarrayscore.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ x = @SVector [1,2,3]
1111
x = @MVector [1,2,3]
1212
@test ArrayInterface.ismutable(x) == true
1313
@test ArrayInterface.ismutable(view(x, 1:2)) == true
14+
@test ArrayInterface.can_setindex(typeof(x)) == true
1415

1516
A = @SMatrix(randn(5, 5))
1617
@test ArrayInterface.lu_instance(A) isa typeof(lu(A))

0 commit comments

Comments
 (0)