Skip to content

Commit e171227

Browse files
committed
Remove cartesian indexing into Block
1 parent ad097ae commit e171227

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

src/blockindices.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ broadcastable(x::Block) = Ref(x)
5656
ndims(::Type{<:Block}) = 0
5757
ndims(::Block) = 0
5858
eltype(::Type{B}) where B<:Block = B
59-
getindex(B::Block, ::CartesianIndex{0}) = BlockIndex()
6059

6160
# The following code is taken from CartesianIndex
6261
@inline (+)(index::Block{N}) where {N} = Block{N}(map(+, index.n))

test/test_blockindices.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ import BlockArrays: BlockIndex, BlockIndexRange, BlockSlice
8585

8686
@testset "BlockIndex" begin
8787
@test Block()[] == BlockIndex()
88-
@test Block()[CartesianIndex()] == BlockIndex()
8988
@test Block(1)[1] == BlockIndex((1,),(1,))
9089
@test Block(1)[1:2] == BlockIndexRange(Block(1),(1:2,))
9190
@test Block(1,1)[1,1] == BlockIndex((1,1),(1,1)) == BlockIndex((1,1),(1,))

0 commit comments

Comments
 (0)