by medo-bear · 3y ago · 0 comments
[1 2 3; 4 5 6; 7 8 9]
then lisp #2A((1 2 3) (3 4 5) (7 8 9))
then python comma freak show [[1,2,3],[4,5,6],[7,8,9]]
python's greatest achievement was bringing open source to matrix calculations and dethroning matlab. python is what it is today because it offered 99% of what matlab offered in open source and for $0 to uni students julia> [1,2,3] # An array of `Int`s
3-element Vector{Int64}:
1
2
3
julia> [1:2, 4:5] # Has a comma, so no concatenation occurs.
2-element Vector{UnitRange{Int64}}:
1:2
4:5
julia> [1:2 4:5 7:8]
2×3 Matrix{Int64}:
1 4 7
2 5 8
julia> [[1,2] [4,5] [7,8]]
2×3 Matrix{Int64}:
1 4 7
2 5 8
julia> [1 2
3 4]
2×2 Matrix{Int64}:
1 2
3 4
julia> a=[1 2 5 8 9; 3 4 2 1 33]
2×5 Array{Int64,2}:
1 2 5 8 9
3 4 2 1 33
https://docs.julialang.org/en/v1/manual/arrays/