Skip to content

Commit 4192164

Browse files
cleanup
1 parent ba74c7b commit 4192164

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/utils.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ julia> unsqueeze(xs, dims=1)
3535
```
3636
"""
3737
function unsqueeze(x::AbstractArray{T,N}; dims::Int) where {T, N}
38-
# @assert 1 <= dims <= N + 1
38+
@assert 1 <= dims <= N + 1
3939
sz = ntuple(i -> i < dims ? size(x, i) : i == dims ? 1 : size(x, i - 1), N + 1)
4040
return reshape(x, sz)
4141
end
@@ -61,9 +61,7 @@ Base.show_function(io::IO, u::Base.Fix2{typeof(_unsqueeze)}, ::Bool) = print(io,
6161
stack(xs; dims)
6262
6363
Concatenate the given array of arrays `xs` into a single array along the
64-
given dimension `dims`. All arrays need to be of the same size.
65-
The number of dimension in the final arrays is one more than the number
66-
of dimensions in the input arrays.
64+
new dimension `dims`. All arrays need to be of the same size.
6765
6866
See also [`unsqueeze`](@ref), [`unstack`](@ref) and [`batch`](@ref).
6967

0 commit comments

Comments
 (0)