Skip to content

Commit 499cf27

Browse files
authored
Apply suggestions
1 parent 5a4b2cb commit 499cf27

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
@@ -109,7 +109,7 @@ of `x` in `labels`. If `x` is not found in labels, then it either returns `oneho
109109
or gives an error if no default is given.
110110
111111
See also [`onehotbatch`](@ref) to apply this to many `x`s,
112-
and [`onecold`](@ref) for a `labels`-aware `argmax`.
112+
and [`onecold`](@ref) to reverse either of these, as well as to generalise `argmax`.
113113
114114
# Examples
115115
```jldoctest
@@ -175,7 +175,7 @@ julia> reshape(1:15, 3, 5) * oh # this matrix multiplication is done efficientl
175175
onehotbatch(ls, labels, default...) = batch([onehot(l, labels, default...) for l in ls])
176176

177177
"""
178-
onecold(y, [labels])
178+
onecold(y::AbstractArray, labels = 1:size(y,1))
179179
180180
Roughly the inverse operation of [`onehot`](@ref) or [`onehotbatch`](@ref):
181181
This finds the index of the largest element of `y`, or each column of `y`,

0 commit comments

Comments
 (0)