Skip to content

Commit 7576e8f

Browse files
committed
Fix method ambiguity?
1 parent d82d294 commit 7576e8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/onehot.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ function Base.:(*)(A::AbstractMatrix, B::OneHotLike{<:Any, L}) where L
189189
end
190190
for wrapper in [:Adjoint, :Transpose]
191191
@eval begin
192-
function Base.:*(A::$wrapper{<:Any, <:AbstractMatrix}, b::OneHotVector{<:Any, L}) where L
192+
function Base.:*(A::$wrapper{<:Any, <:AbstractMatrix{T}}, b::OneHotVector{<:Any, L}) where {L, T}
193193
size(A, 2) != L ||
194194
throw(DimensionMismatch("Matrix column must correspond with OneHot size: $(size(A, 2)) != $L"))
195195

196196
return A[:, b.ix]
197197
end
198198

199-
function Base.:*(A::$wrapper{<:Number, <:AbstractVector}, b::OneHotVector{<:Any, L}) where L
199+
function Base.:*(A::$wrapper{<:Number, <:AbstractVector{T}}, b::OneHotVector{<:Any, L}) where {L, T}
200200
size(A, 2) != L ||
201201
throw(DimensionMismatch("Matrix column must correspond with OneHot size: $(size(A, 2)) != $L"))
202202

0 commit comments

Comments
 (0)