We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
repeat!
Y
1 parent 81b1849 commit cf1d7a2Copy full SHA for cf1d7a2
src/general.jl
@@ -48,6 +48,8 @@ repeatdiag(A, n::Int) = kron(I(n), A)
48
function repeat!(Y::Vector, a::Vector, n::Int)
49
na = length(a)
50
for i=0:n-1
51
+ # stop if Y is too short, another clearer error is thrown later in the code:
52
+ na*(i+1) > length(Y) && break
53
Y[(1+na*i):(na*(i+1))] = a
54
end
55
return Y
0 commit comments