I am trying to do something that, in my opinion, should be relatively simple in Julia, but I cannot find any mention of this problem.
Basically, I have a matrix mxnand a vector nx1. What I would like to do is multiply the vector by the matrix, element-wise, but along the axis, so that each element of the matrix is ββmultiplied.
In numpyfor example, it would be:
np.multiply(array, vector)
Is there any way to do this in Julia?
I tried just expanding the vector to fill the array:
projection = 1:size(matrix)[1]
weight_change = hcat(map(x -> vector, projection))
but it gives something with a type Array{Array{Float64, 2}, 2}when I really just need it Array{Float64, 2}, which means that elementary multiplication will not really work.
Is there a way to fix my approach or fix my listening solution?