Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed can_setindex for MArray #429

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ArrayInterface"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "7.7.0"
version = "7.7.1"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
1 change: 1 addition & 0 deletions ext/ArrayInterfaceStaticArraysCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ArrayInterface.ismutable(::Type{<:StaticArraysCore.MArray}) = true
ArrayInterface.ismutable(::Type{<:StaticArraysCore.SizedArray}) = true

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

function ArrayInterface.lu_instance(_A::StaticArraysCore.StaticMatrix{N,N}) where {N}
Expand Down
1 change: 1 addition & 0 deletions test/staticarrayscore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ x = @SVector [1,2,3]
x = @MVector [1,2,3]
@test ArrayInterface.ismutable(x) == true
@test ArrayInterface.ismutable(view(x, 1:2)) == true
@test ArrayInterface.can_setindex(typeof(x)) == true

A = @SMatrix(randn(5, 5))
@test ArrayInterface.lu_instance(A) isa typeof(lu(A))
Expand Down
Loading