Skip to content

Commit 1c7f2b5

Browse files
committed
fix: get rid of one hot array hcat override
1 parent f1cf065 commit 1c7f2b5

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Flux = "0.16"
3535
HierarchicalUtils = "2.1.5"
3636
MLUtils = "0.4.4"
3737
MacroTools = "0.5.13"
38-
OneHotArrays = "0.2.5"
38+
OneHotArrays = "0.2.8"
3939
PooledArrays = "1.4.2"
4040
Preferences = "1.4.1"
4141
SparseArrays = "1"

src/util.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# can be removed when https://github.com/FluxML/OneHotArrays.jl/issues/32 is closed
2-
function Base.reduce(::typeof(hcat), xs::Vector{T}) where T <: OneHotLike
3-
L = size(xs[1], 1)
4-
all(x -> size(x, 1) .== L, xs) ||
5-
throw(DimensionMismatch("The number of labels are not the same for all one-hot arrays."))
6-
OneHotArray(reduce(vcat, map(OneHotArrays._indices, xs)), L)
7-
end
8-
91
"""
102
pred_lens(p, n)
113

0 commit comments

Comments
 (0)