Skip to content

Commit

Permalink
Fix bug in colsupport with col-vec views (#62)
Browse files Browse the repository at this point in the history
* Fix bug in colsupport with col-vec views

* v0.6.5
  • Loading branch information
dlfivefifty committed Apr 11, 2021
1 parent 0273e85 commit ce37dcd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ArrayLayouts"
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
authors = ["Sheehan Olver <solver@mac.com>"]
version = "0.6.4"
version = "0.6.5"

[deps]
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand Down
2 changes: 1 addition & 1 deletion src/memorylayout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ colsupport(A, j) = colsupport(MemoryLayout(A), A, j)
colsupport(A) = colsupport(A, axes(A,2))

# TODO: generalise to other subarrays
function colsupport(A::SubArray{<:Any,N,<:Any,<:Tuple{Slice,Any}}, j) where N
function colsupport(A::SubArray{<:Any,N,<:Any,<:Tuple{Slice,AbstractVector}}, j) where N
_, jr = parentindices(A)
colsupport(parent(A), jr[j])
end
Expand Down
4 changes: 4 additions & 0 deletions test/test_layouts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,8 @@ struct FooNumber <: Number end
MemoryLayout(revD)
@test 0 == @allocated MemoryLayout(revD)
end

@testset "bug in vec views BandedMatrices#233" begin
@test colsupport(view(randn(5,5),:,1),1:1) Base.OneTo(5)
end
end

2 comments on commit ce37dcd

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/34022

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.5 -m "<description of version>" ce37dcd33c4c612b0f88983aa7dd450c7098902d
git push origin v0.6.5

Please sign in to comment.