Skip to content

Commit fec1e4b

Browse files
committed
Fix ambiguity error
1 parent afc3f87 commit fec1e4b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/abstractblocksparsearray/views.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,8 @@ function BlockArrays.viewblock(
271271
return viewblock(a, to_tuple(block)...)
272272
end
273273

274-
_block(x) = error("Not implemented.")
275-
_block(x::BlockSlice) = x.block
276-
_block(x::BlockIndices) = x.blocks
274+
blockedslice_blocks(x::BlockSlice) = x.block
275+
blockedslice_blocks(x::BlockIndices) = x.blocks
277276

278277
# TODO: Define `@interface BlockSparseArrayInterface() viewblock`.
279278
function BlockArrays.viewblock(
@@ -285,7 +284,7 @@ function BlockArrays.viewblock(
285284
# TODO: Ideally we would use this but it outputs a Vector,
286285
# not a range:
287286
# return parentindices(a)[dim].block[I[dim]]
288-
return blocks(_block(parentindices(a)[dim]))[Int(I[dim])]
287+
return blocks(blockedslice_blocks(parentindices(a)[dim]))[Int(I[dim])]
289288
end
290289
return @view parent(a)[brs...]
291290
end

0 commit comments

Comments
 (0)