From 5b9c53439b9f791c5dae8a4c28d029e7e9d9536c Mon Sep 17 00:00:00 2001 From: Dhairya Gandhi Date: Thu, 4 Apr 2019 19:19:47 +0530 Subject: [PATCH] recreate OHV --- src/onehot.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onehot.jl b/src/onehot.jl index 488167e2..12a77ecd 100644 --- a/src/onehot.jl +++ b/src/onehot.jl @@ -9,7 +9,7 @@ Base.size(xs::OneHotVector) = (Int64(xs.of),) Base.getindex(xs::OneHotVector, i::Integer) = i == xs.ix -Base.getindex(xs::OneHotVector, ::Colon) = xs +Base.getindex(xs::OneHotVector, ::Colon) = OneHotVector(xs.ix, xs.of) A::AbstractMatrix * b::OneHotVector = A[:, b.ix]