Skip to content

Commit a2bf780

Browse files
authored
Typo in error message of setindex! for slicing SparseAxisArrays (#3057)
1 parent f31840c commit a2bf780

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Containers/SparseAxisArray.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ function Base.setindex!(d::SparseAxisArray{T,N,K}, value, idx...) where {T,N,K}
9999
elseif _sliced_key_type(K, idx...) !== nothing
100100
throw(
101101
ArgumentError(
102-
"Slicing is not when calling setindex! on a SparseAxisArray",
102+
"Slicing is not supported when calling `setindex!` on a" *
103+
" SparseAxisArray",
103104
),
104105
)
105106
end

test/Containers/SparseAxisArray.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ $(SparseAxisArray{Float64,2,Tuple{Symbol,Char}}) with 2 entries"""
214214
@testset "Slicing on set" begin
215215
Containers.@container(x[i = 1:4, j = 1:2; isodd(i + j)], i + j)
216216
err = ArgumentError(
217-
"Slicing is not when calling setindex! on a SparseAxisArray",
217+
"Slicing is not supported when calling `setindex!` on a" *
218+
" SparseAxisArray",
218219
)
219220
@test_throws(err, x[:, :] = 1)
220221
@test_throws(err, x[1, :] = 1)

0 commit comments

Comments
 (0)