Skip to content

Commit ce37dcd

Browse files
authored
Fix bug in colsupport with col-vec views (#62)
* Fix bug in colsupport with col-vec views * v0.6.5
1 parent 0273e85 commit ce37dcd

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-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 = "ArrayLayouts"
22
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.6.4"
4+
version = "0.6.5"
55

66
[deps]
77
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"

src/memorylayout.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ colsupport(A, j) = colsupport(MemoryLayout(A), A, j)
648648
colsupport(A) = colsupport(A, axes(A,2))
649649

650650
# TODO: generalise to other subarrays
651-
function colsupport(A::SubArray{<:Any,N,<:Any,<:Tuple{Slice,Any}}, j) where N
651+
function colsupport(A::SubArray{<:Any,N,<:Any,<:Tuple{Slice,AbstractVector}}, j) where N
652652
_, jr = parentindices(A)
653653
colsupport(parent(A), jr[j])
654654
end

test/test_layouts.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,8 @@ struct FooNumber <: Number end
428428
MemoryLayout(revD)
429429
@test 0 == @allocated MemoryLayout(revD)
430430
end
431+
432+
@testset "bug in vec views BandedMatrices#233" begin
433+
@test colsupport(view(randn(5,5),:,1),1:1) Base.OneTo(5)
434+
end
431435
end

0 commit comments

Comments
 (0)