File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
name = " BlockArrays"
2
2
uuid = " 8e7c35d0-a365-5155-bbbb-fb81a777f24e"
3
- version = " 0.16.30 "
3
+ version = " 0.16.31 "
4
4
5
5
[deps ]
6
6
ArrayLayouts = " 4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ _blocklengths2blocklasts(blocks) = cumsum(blocks) # extra level to allow changin
65
65
66
66
_diff (a:: AbstractVector ) = diff (a)
67
67
_diff (a:: Tuple ) = diff (collect (a))
68
- @inline blocklengths (a:: BlockedUnitRange ) = isempty (a. lasts) ? _diff (a. lasts) : [first (a. lasts)- a. first+ 1 ; _diff (a. lasts)]
68
+ @inline blocklengths (a:: BlockedUnitRange ) = isempty (a. lasts) ? [ _diff (a. lasts);] : [first (a. lasts)- a. first+ 1 ; _diff (a. lasts)]
69
69
70
70
length (a:: BlockedUnitRange ) = isempty (a. lasts) ? 0 : Integer (last (a. lasts)- a. first+ 1 )
71
71
Original file line number Diff line number Diff line change 171
171
@test blocklengths (f) ≡ Fill (2 ,5 )
172
172
173
173
r = blockedrange (Base. OneTo (5 ))
174
+ @test (@inferred blocklengths (r)) == 1 : 5
174
175
@test blocklasts (r) ≡ ArrayLayouts. RangeCumsum (Base. OneTo (5 ))
175
176
end
176
177
You can’t perform that action at this time.
0 commit comments