Suppose I have a vtype variable Vector.
v
Vector
What is the best / fastest way to just convert it to a view Matrix(for some reason)?
Matrix
To clarify, v''complete the task, but the best way to do this?
v''
v[:,:]probably the clearest way to do this.
v[:,:]
For example:
julia> v=[1,2,3] 3-element Array{Int64,1}: 1 2 3 julia> m=v[:,:] 3x1 Array{Int64,2}: 1 2 3 julia> ndims(m) 2
Reform should be the most effective. From the docs:
(A, dims): , , . , .
julia> v = rand(3) 3-element Array{Float64,1}: 0.690673 0.392635 0.0519467 julia> reshape(v, length(v), 1) 3x1 Array{Float64,2}: 0.690673 0.392635 0.0519467
Source: https://habr.com/ru/post/1622765/More articles:Find the number (position) of the node list in the list - pythonСмущенный jQuery не найден, когда я его знаю - javascriptdplyr - Pivot table for multiple variables - rIOS general permissions: check if user selected "Do not save passwords" in Safari - authenticationЗадержка таймера Java 1 мс слишком быстра? - javaPerl errors when trying to replace words in a large file - perlEstablishment of exponential decay and extension of the time constant in R - rHow to horizontally position backIndicatorImage in UINavigationBar - iosDelphi android application raises problem in Lennova A5000 mobile phone - androidReading configuration files without entering keys but values using python configparser - pythonAll Articles