diff --git a/src/reshape.jl b/src/reshape.jl index f0aa3ad..43256d8 100644 --- a/src/reshape.jl +++ b/src/reshape.jl @@ -1,18 +1,8 @@ """ Base.reshape(x::Number, dims...) -Reshape any matrix with dimensions "dims" +Reshape a number `x` into a tensor with `length(dims)` legs that must all be of dimension 1 -# Example - -```julia-repl -julia> A = rand(2,3,2) - -julia> B = reshape(A,4,3) - -julia> size(B) == (4,3) - -``` """ function Base.reshape(x::Number, dims...) prod(dims) == 1 || throw(DimensionMismatch("new dimensions $(dims) must be consistent with array size 1"))