Skip to content

Commit c409a9e

Browse files
committed
Fixed CartesianIndices indexing
1 parent b8541e9 commit c409a9e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ComponentArrays"
22
uuid = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
33
authors = ["Jonnie Diegelman <47193959+jonniedie@users.noreply.github.com>"]
4-
version = "0.13.0"
4+
version = "0.13.1"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/ComponentArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import ArrayInterface.ArrayInterfaceCore
77
using LinearAlgebra
88
using Requires
99

10-
const FlatIdx = Union{Integer, CartesianIndex, AbstractArray{<:Integer}}
10+
const FlatIdx = Union{Integer, CartesianIndex, CartesianIndices, AbstractArray{<:Integer}}
1111
const FlatOrColonIdx = Union{FlatIdx, Colon}
1212

1313

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ end
208208

209209
@test ca[CartesianIndex(1)] == ca[1]
210210
@test cmat[CartesianIndex(1, 2)] == cmat[1, 2]
211+
@test cmat[CartesianIndices(cmat)] == getdata(cmat)
211212

212213
@test getproperty(ca, Val(:a)) == ca.a
213214

0 commit comments

Comments
 (0)