File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,10 @@ https://github.com/JuliaDiffEq/RecursiveArrayTools.jl/issues/19.
72
72
ismutable (x) = ismutable (typeof (x))
73
73
74
74
ismutable (:: Type{<:AbstractArray} ) = true
75
- ismutable (:: Type{<:Number} ) = false
76
75
ismutable (:: Type{<:AbstractRange} ) = false
77
- ismutable (:: Type{<:Tuple} ) = false
76
+ ismutable (:: Type{<:AbstractDict} ) = true
77
+ ismutable (:: Type{<:Base.ImmutableDict} ) = false
78
+ ismutable (:: Type{T} ) where {T} = T. mutable
78
79
79
80
# Piracy
80
81
function Base. setindex (x:: AbstractArray ,v,i... )
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ using StaticArrays
8
8
@test ArrayInterface. ismutable (@MVector [1 ,2 ,3 ]) == true
9
9
@test ArrayInterface. ismutable (1 : 10 ) == false
10
10
@test ArrayInterface. ismutable ((0.1 ,1.0 )) == false
11
+ @test ArrayInterface. ismutable (Base. ImmutableDict{Symbol,Int64}) == false
12
+ @test ArrayInterface. ismutable ((;x= 1 )) == false
11
13
@test isone (ArrayInterface. known_first (typeof (StaticArrays. SOneTo (7 ))))
12
14
@test ArrayInterface. known_last (typeof (StaticArrays. SOneTo (7 ))) == 7
13
15
@test ArrayInterface. known_length (typeof (StaticArrays. SOneTo (7 ))) == 7
@@ -47,6 +49,7 @@ rowind,colind=findstructralnz(Sp)
47
49
@test ArrayInterface. ismutable (spzeros (1 , 1 ))
48
50
@test ArrayInterface. ismutable (spzeros (1 ))
49
51
52
+
50
53
@test ! fast_scalar_indexing (qr (rand (10 , 10 )). Q)
51
54
@test ! fast_scalar_indexing (qr (rand (10 , 10 ), Val (true )). Q)
52
55
@test ! fast_scalar_indexing (lq (rand (10 , 10 )). Q)
You can’t perform that action at this time.
0 commit comments