a=[7 -1 -1]
b=union(a)
c=reshape(b,(:,3))
print(c)
this is a simple code,but it is wrong,it shows:
DimensionMismatch(“array size 2 must be divisible by the product of the new dimensions (Colon(), 3)”)
why?thank you!
a=[7 -1 -1]
b=union(a)
c=reshape(b,(:,3))
print(c)
this is a simple code,but it is wrong,it shows:
DimensionMismatch(“array size 2 must be divisible by the product of the new dimensions (Colon(), 3)”)
why?thank you!
julia> a = [7 -1 -1]
1×3 Array{Int64,2}:
7 -1 -1
julia> union(a)
2-element Array{Int64,1}:
7
-1
There are only 2 elements