I'm trying to do something that I believe should be relatively simple in Julia, but I can't seem to find any mention of this problem.
Basically what I've got is an mxn matrix, and an nx1 vector. What I would like to do is multiply the vector against the matrix, elementwise, but along the axis such that every element of the matrix is multiplied.
In numpy for instance this would be:
np.multiply(array, vector)
Is there any way to do this in Julia?
I tried just extending the vector to fill an array:
projection = 1:size(matrix)[1]
weight_change = hcat(map(x -> vector, projection))
but that yields something with a type of Array{Array{Float64, 2}, 2}, when what I really need is just Array{Float64, 2}, which means that an elementwise multiplication won't really work.
Is there any way to either fix my approach or remedy my bugged solution?
np.multiply(array, vector, axis=0)isn't validnumpy, is it? - DSM