combine special cases

This commit is contained in:
Mike J Innes 2017-10-31 16:37:33 +00:00
parent 3d8b7250ae
commit e943a39ee7

View File

@ -1,5 +1,7 @@
# TODO: broadcasting cat
combine(x, h) = vcat(x, h .* trues(1, size(x, 2)))
combine(x::AbstractMatrix, h::AbstractVector) = vcat(x, h .* trues(1, size(x, 2)))
combine(x::AbstractVector, h::AbstractVector) = vcat(x, h)
combine(x::AbstractMatrix, h::AbstractMatrix) = vcat(x, h)
# Stateful recurrence