recreate OHV

This commit is contained in:
Dhairya Gandhi 2019-04-04 19:19:47 +05:30
parent 4f1336905f
commit 5b9c53439b

View File

@ -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]