We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89c6669 commit 2999cfeCopy full SHA for 2999cfe
src/utils.jl
@@ -15,9 +15,12 @@ end
15
16
A lightweight box for an `AbstractMatrix` to make it behave like a vector of vectors.
17
"""
18
-struct ColVecs{T, TX<:AbstractMatrix{T}} <: AbstractVector{SubArray}
+struct ColVecs{T, TX<:AbstractMatrix{T}, S} <: AbstractVector{S}
19
X::TX
20
- ColVecs(X::TX) where {T, TX<:AbstractMatrix{T}} = new{T, TX}(X)
+ function ColVecs(X::TX) where {T, TX<:AbstractMatrix{T}}
21
+ S = typeof(view(X, :, 1))
22
+ new{T, TX, S}(X)
23
+ end
24
end
25
26
Base.size(D::ColVecs) = (size(D.X, 2),)
0 commit comments