Skip to content

Commit a279a5b

Browse files
committed
whitespace
1 parent 51be801 commit a279a5b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/utils.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# internal method essentially the same as Base.replace!(y, (z .=> r)...)
22
# but more efficient.
3-
# Similar to the behaviour of `Base.replace!` if `z` contain repetions of values in
3+
# Similar to the behaviour of `Base.replace!` if `z` contain repetions of values in
44
# `y` then only the transformation corresponding to the first occurence is performed
55
# i.e `_replace!([1,5,3], [1,4], 4:5)` would return `[4,5,3]` rather than `[5,5,3]`
66
# (which replaces `1=>4` and then `4=>5`)
77
function _replace!(y::AbstractVector, z::AbstractVector, r::AbstractVector)
8-
length(r) == length(z) ||
8+
length(r) == length(z) ||
99
throw(DimensionMismatch("`z` and `r` has to be of the same length"))
1010
@inbounds for i in eachindex(y)
11-
for j in eachindex(z)
11+
for j in eachindex(z)
1212
isequal(z[j], y[i]) && (y[i] = r[j]; break)
1313
end
1414
end
@@ -35,7 +35,7 @@ Implementation taken from NNlib.jl.
3535
"""
3636
function softmax!(X::AbstractMatrix{<:Real})
3737
max_ = maximum(X, dims=2)
38-
X .= exp.(X .- max_)
38+
X .= exp.(X .- max_)
3939
X ./= sum(X, dims=2)
40-
return X
40+
return X
4141
end

0 commit comments

Comments
 (0)