From 646720cd05cb7fe16da1732d9016708d8d19ff1f Mon Sep 17 00:00:00 2001 From: Mike J Innes Date: Sun, 15 Oct 2017 23:44:16 +0100 Subject: [PATCH] fix --- src/onehot.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onehot.jl b/src/onehot.jl index aea68829..48167a0e 100644 --- a/src/onehot.jl +++ b/src/onehot.jl @@ -20,7 +20,7 @@ Base.getindex(xs::OneHotMatrix, i::Int, j::Int) = xs.data[j][i] Base.:*(A::AbstractMatrix, B::OneHotMatrix) = A[:, map(x->x.ix, B.data)] -Base.hcat(x::OneHotVector, xs::OneHotVector...) = OneHotMatrix([x, xs...]) +Base.hcat(x::OneHotVector, xs::OneHotVector...) = OneHotMatrix(length(x), [x, xs...]) import NNlib.adapt