Skip to content

Commit 3e475af

Browse files
darsnackracinmat
authored andcommitted
Go back to kwargs
1 parent 117c613 commit 3e475af

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/MLLabelUtils.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import LearnBase: ind2label,
2323
labelenc,
2424
islabelenc,
2525
convertlabelview
26+
using LearnBase: default_obsdim
2627

2728
export
2829

src/convertlabel.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,23 @@ function LearnBase.convertlabelview(dst::LearnBase.VectorLabelEncoding{T,2},
4040
end
4141

4242
function LearnBase.convertlabelview(dst::LearnBase.VectorLabelEncoding{T,K},
43-
values::AbstractVector{V},
44-
src::LearnBase.VectorLabelEncoding{V,K}) where {T,K,V}
43+
values::AbstractVector{V},
44+
src::LearnBase.VectorLabelEncoding{V,K}) where {T,K,V}
4545
f = x -> convertlabel(dst, x, src)
4646
finv = x -> convertlabel(src, x, dst)
4747
MappedArray{T,1,typeof(values),typeof(f),typeof(finv)}(f, finv, values)
4848
end
4949

5050
## General Vector based
5151

52-
function LearnBase.convertlabel(dst::LearnBase.VectorLabelEncoding{T,K}, x, src::LearnBase.VectorLabelEncoding{S,K}) where {T,K,S}
52+
function LearnBase.convertlabel(dst::LearnBase.VectorLabelEncoding{T,K}, x,
53+
src::LearnBase.VectorLabelEncoding{S,K}) where {T,K,S}
5354
ind2label(label2ind(x, src), dst)::T
5455
end
5556

5657
function LearnBase.convertlabel(dst::LearnBase.VectorLabelEncoding{T,K},
57-
values::AbstractVector,
58-
src::LearnBase.VectorLabelEncoding{S,K}) where {T,K,S}
58+
values::AbstractVector,
59+
src::LearnBase.VectorLabelEncoding{S,K}) where {T,K,S}
5960
convertlabel.(dst, values, src)::_array_type(T,Val{1})
6061
end
6162

0 commit comments

Comments
 (0)