Skip to content

Commit 767d82b

Browse files
authored
Expand comment a bit
1 parent 9ecd842 commit 767d82b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/blocksparsearrayinterface/blocksparsearrayinterface.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,19 @@ AbstractMatrix{Float64} (alias for AbstractArray{Float64, 2})
6060
julia> eltype(blocks(randn(2, 2)))
6161
AbstractMatrix{Float64} (alias for AbstractArray{Float64, 2})
6262
```
63-
Also note the current definition doesn't handle the limit
64-
when `blocks(a)` is empty
63+
Also note the current definition errors in the limit
64+
when `blocks(a)` is empty, but even empty arrays generally
65+
have at least one block:
66+
```julia
67+
julia> length(blocks(randn(0)))
68+
1
69+
70+
julia> length(blocks(BlockVector{Float64}(randn(0))))
71+
1
72+
73+
julia> length(blocks(BlockedVector{Float64}(randn(0))))
74+
1
75+
```
6576
=#
6677
function blocktype(a::AbstractArray)
6778
if isempty(blocks(a))

0 commit comments

Comments
 (0)