I know how to combine a string "s" with a vector of integers i to get a string "si". For example, if I want to create the vector ["a1","a2","a3"], I do
How can I create a vector using this same “procedure” but now with than one string “s”. For instance, if I want to create a vector ["a1","b1","a2","b2","a3","b3"]?
julia> typeof([1 2 3])
Matrix{Int64} (alias for Array{Int64, 2})
Are there use cases where the resultant type affects performance and we should choose one over the other? Or is that purely a function of whether the elements in the array itself are type stable?
Sorry if this is a silly question but just trying to get a better grasp of the fundamentals here.
It’s a bit of a misuse (but a convenient one) to employ ' outside of a Linear Algebra context. The LinearAlgebra.Adjoint type is an example of a wrapper type which keeps the original array in the background but acts like some operation was applied. This is used with multiple dispatch for optimizations. E.g. x'' returns x itself without doing any work at all and x' * x is dispatched to a method which calls the dot function.