Skip to content

Commit

Permalink
Split out N=1 in Khatri-rao
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmul1114 committed Jan 16, 2024
1 parent 6d33f3b commit 48d965e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gcp-opt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ end
of the matrices `A1`, `A2`, etc.
"""
function khatrirao(A::Vararg{T,N}) where {T<:AbstractMatrix,N}
if N == 1
return A[1]
end
r = size(A[1],2)
# @boundscheck all(==(r),size.(A,2)) || throw(DimensionMismatch())
R = ntuple(Val(N)) do k
Expand Down

0 comments on commit 48d965e

Please sign in to comment.